Please check the the captcha form.
‘;
echo “response: $response
\n”;
echo “captcha: $captcha
\n”;
exit;
}
$jsonresponse = json_decode($response);
//if($myvar->{‘success’} == false){…}
//if($response.success == false) {
if($jsonresponse->{‘success’} != true) {
var_dump($jsonresponse);
echo ‘
Sorry, something is wrong
‘;
echo ‘Please check the form and try again.’;
}
else {
//$firstlast = $_POST[“firstlast”];
//$email = $_POST[“email”];
//$message = $_POST[“message”];
$email = “kyleads@louisville.edu”;
$subject = “Contact form on kentuckyleads.org”;
$message = “The form on the page https://www.kentuckyleads.org/contact-form/ has been submitted. See below for details.\n”;
$message .= “\n”;
$message .= “Type of help requested: “;
if ($_POST[“requested”] == “mailactionplan”)
$message .= “‘Mail me a free copy of Lung Cancer in Kentucky’\n”;
else if ($_POST[“requested”] == “callme”)
$message .= “Call my office\n”;
else if ($_POST[“requested”] == “other”)
$message .= “Other: ” . $_POST[“othertext”] . “\n”;
else
$message = “\n”;
$message .= “Name: ” . $_POST[“fullname”] . “\n”;
$message .= “Address: ” . $_POST[“address”] . “\n”;
$message .= “City: ” . $_POST[“city”] . “\n”;
$message .= “Zip: ” . $_POST[“zip”] . “\n”;
$message .= “Provider type: ” . $_POST[“providertype”] . “\n”;
$message .= “Other (if selected): ” . $_POST[“providertypeother”] . “\n”;
$message .= “Email: ” . $_POST[“email”] . “\n”;
$message .= “Phone (if applicable): ” . $_POST[“phone”] . “\n”;
$message .= “Staff person who will schedule visit: (if applicable): ” . $_POST[“staffperson”] . “\n”;
$message .= “Other comments: ” . $_POST[“othercomments”] . “\n”;
//mail($email,”Email from cancer.uky.edu form”,”$firstlast,\n\nBelow is an email from the contact form on the cancer.uky.edu website.\n\n$message”);
mail($email,$subject,$message);
echo ‘
Thanks!
‘;
echo “Your information has been submitted.\n”;
}
?>