Please fill out name and email fields prior to submitting the form.
";
}
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 = "An incorrect spam prevention phrase was entered. Please enter the letters you see in the image.
";
}
}
if ($goodCaptcha == true) // go ahead and process the form
{
$formInfo = "Form submittal via the $locationTitle form from IP " . $_SERVER['REMOTE_ADDR'] . "
Here is the information they submitted:
---------------------------------------
Name: " . stripslashes($name) . "\n\n";
$formInfo .= "Business Name: " . stripslashes($businessname) . "\n\n";
$formInfo .= "Email: " . stripslashes($email) . "\n\n";
$formInfo .= "Phone: " . stripslashes($phone) . "\n\n";
$formInfo .= "Business Type: " . stripslashes($businesstype) . "\n\n";
$formInfo .= "Number of Employees: " . stripslashes($numberofemployees) . "\n\n";
$formInfo .= "Mailing Address: " . stripslashes($mailingaddress) . "\n\n";
$formInfo .= "Year Started: " . stripslashes($yearstarted) . "\n\n";
$formInfo .= "My Goals: " . stripslashes($mygoals) . "\n\n";
$formInfo .= "Biggest Concern Now: " . stripslashes($biggestconcernnow) . "\n\n";
$formInfo .= "Contact Via: " . stripslashes($contactvia) . "\n\n";
$headers = "From: " . $fromAddress . " <" . $fromAddress . ">\r\n";
// now, mail the item!
@mail($toAddress, $subject, $formInfo, $headers); //exit;
header("Location: thanks-contact.html");
}
}
?>