Sorry for the rookie mistake. I'm not accustomed to asking for help. Here's the error code and the correct format for this posting. Thanks for your patience.
The only error I get is:
The reCAPTCHA wasn't entered correctly. Go back and try it again.(reCAPTCHA said: incorrect-captcha-sol)
Even though I've entered it correctly.
This is the code in the verify.php file:
<?php
// Website Contact Form Generator
// http://www.tele-pro.co.uk/scripts/contact_form/
// This script is free to use as long as you
// retain the credit link
// get posted data into local variables
$EmailFrom = "example.com";
$EmailTo = "example@example.com";
$Subject = "Inquiry on example.com";
$FirstName = Trim(stripslashes($_POST['FirstName']));
$LastName = Trim(stripslashes($_POST['LastName']));
$Address1 = Trim(stripslashes($_POST['Address1']));
$Address2 = Trim(stripslashes($_POST['Address2']));
$City = Trim(stripslashes($_POST['City']));
$State = Trim(stripslashes($_POST['State']));
$Zip = Trim(stripslashes($_POST['Zip']));
$Company = Trim(stripslashes($_POST['Company']));
$Emailaddress = Trim(stripslashes($_POST['Emailaddress']));
$QuestionComment = Trim(stripslashes($_POST['QuestionComment']));
// validation
$validationOK=true;
if (Trim($FirstName)=="") $validationOK=false;
if (Trim($LastName)=="") $validationOK=false;
if (Trim($Company)=="") $validationOK=false;
if (Trim($Emailaddress)=="") $validationOK=false;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=alerts.html\">";
exit;
}
// prepare email body text
$Body = "";
$Body .= "First Name: ";
$Body .= $FirstName;
$Body .= "\n";
$Body .= "Last Name: ";
$Body .= $LastName;
$Body .= "\n";
$Body .= "Address 1: ";
$Body .= $Address1;
$Body .= "\n";
$Body .= "Address 2: ";
$Body .= $Address2;
$Body .= "\n";
$Body .= "City: ";
$Body .= $City;
$Body .= "\n";
$Body .= "State: ";
$Body .= $State;
$Body .= "\n";
$Body .= "Zip: ";
$Body .= $Zip;
$Body .= "\n";
$Body .= "Company Name: ";
$Body .= $Company;
$Body .= "\n";
$Body .= "Email address: ";
$Body .= $Emailaddress;
$Body .= "\n";
$Body .= "QuestionComment: ";
$Body .= $QuestionComment;
$Body .= "\n";
require_once('recaptchalib.php');
$privatekey = "******************";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_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 . ")");
}
else{
// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");
// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=thankyou.html\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=alerts.html\">";
}
}
?>
This is the code on the html form residing within the <form> tag and posting to verify.php.
<script type="text/javascript"
src="http://api.recaptcha.net/challenge?k=6Ldp0QoAAAAAAL11iLe-m_E1O_Z0VZiENeTYiyJi">
</script>
<noscript>
<iframe src="http://api.recaptcha.net/noscript?k=6Ldp0QoAAAAAAL11iLe-m_E1O_Z0VZiENeTYiyJi"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>