I'd love to hear from you!
Contact me at diana@diananagy.com or use the form below!
Please fill out name and email fields prior to sending!
";
}
else // check captcha
{
if ($_SESSION['security_code'] == stripslashes($_POST['phrase']) && !empty($_SESSION['security_code']))
{
unset($_SESSION['security_code']);
$goodCaptcha = true;
}
else
{
// invalid code entered
unset($_SESSION['security_code']);
$errorMsg = "You seem to have entered an incorrect spam prevention phrase. Please enter the letters you see in the image.
";
}
}
if ($goodCaptcha == true) // go ahead and process the form
{
$formInfo = "
Here is the information they submitted:
---------------------------------------\n";
$formInfo .= "Name: " . stripslashes($fullName) . "\n";
$formInfo .= "Email: " . stripslashes($email) . "\n\n";
$formInfo .= stripslashes($comments) . "\n\n";
$headers = "From: " . $fromAddress . " <" . $fromAddress . ">\r\n";
// now, mail the item!
@mail($toAddress, $subject, $formInfo, $headers); //exit;
header("Location: contact-thanks.html");
}
}
?>