Hi i’m added some code from google’s reCAPTCHA tool into my php script, my php worked before adding this new code but it doesn’t work now. I really want reCAPTCHA on my site so what is the problem with this code i presume the code is conflicting with eachother. The error message im getting is…
[B]Parse error: syntax error, unexpected $end in /home2/all05/public_html/verify.php on line 129
now line 129 is the last line…
[COLOR=”Blue”]<?php
require_once(‘recaptchalib.php’);
if ($_POST[’email’] != ”) {
$privatekey = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
$resp = recaptcha_check_answer ($privatekey,
$_SERVER[“REMOTE_ADDR”],
$
$_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 {
$EmailTo = “
$Subject = “Contact From The Website”;
$full_name = Trim(stripslashes($_POST[‘full_name’]));
$email_address = Trim(stripslashes($
$tel_number = Trim(stripslashes($_POST[‘tel_number’]));
$validationOK=true;
if (Trim($full_name)==””) $validationOK=false;
if (Trim($email_address)==””) $validationOK=false;
if (Trim($tel_number)==””) $validationOK=false;
if (!$validationOK) {
print “<meta http-equiv=”refresh” content=”0;URL=goback.htm”>”;
exit;
}
$Body .= “n”;
$Body .= “Full Name: “;
$Body .= $full_name;
$Body .= “n”;
$Body .= ” “;
$Body .= “n”;
$Body .= “E-Mail Address: “;
$Body .= $email_address;
$Body .= “n”;
$Body .= ” “;
$Body .= “n”;
$Body .= “Telephone Number: “;
$Body .= $tel_number;
$success = email($EmailTo, $Subject, $Body, “From: <$email_address>”);
if ($success){
print “<meta http-equiv=”refresh” content=”0;URL=thanks.htm”>”;
}
else{
print “<meta http-equiv=”refresh” content=”0;URL=error.htm”>”;
} php?>