I am not a PHP programmer... but literate and need some help.
I followed the inko9nito blog I found on the direction page, but I
keep
getting errors.
I put this piece of code before the Submit button, where I want the
CAPTCHA
to appear. (the recaptchaliblib is in the same directory as the php
form and made sure to put the proper keys between the quotes...)
<?php
require_once('recaptchalib.php');
$publickey = "…";
?>
"We need to add the following code to the process.php file" .... I
added it to
the same book_new.php before the form begins
<?php
require_once('recaptchalib.php');
$privatekey = "...";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["....."],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
die ("The reCAPTCHA wasn’t entered correctly. Go back and try it
again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
?>
<?
$FromEmail = 'Unions in Paradise <
eve...@unionsinparadise.com>';
$ToEmail = 'Unions in Paradise <
eve...@unionsinparadise.com>';
$Subject = 'Web Contact Form';
$Success = 'Thank you for your interest in Unions in Paradise. Your
inquiry
has been successfully sent. A representative will contact you
promptly. We
look forward to creating another "Event Remembered".';
The error I get is for the following form
(
http://www.unionsinparadise.com/book_new.php) is:
(For security reasons, you must pass the remote ip to reCAPTCHA)
I put the
unionsinparadise.com IP address in the code and I've also
tried it leaving the default: $_SERVER["REMOTE_ADDR"],
What am I doing wrong? Before I added the captcha code you could see
the
form and it worked fine, just having problems with the spammers
hijacking
the form...
Any assistance would be greatly appreciated.