if ($_POST['submit']) {
# error checking
$errors = "";
if (!$_POST['firstName']) { $errors .= "Name
\n"; }
if (!$_POST['lastName']) { $errors .= "Name
\n"; }
if (!$_POST['email']) { $errors .= "Email
\n"; }
if (!$_POST['zip']) { $errors .= "Name
\n"; }
if (!$_POST['message']) { $errors .= "Name
\n"; }
#
# send message
if (!$errors) {
$message = "
First Name: {$_POST['firstName']}
Last Name: {$_POST['lastName']}
Email: {$_POST['email']}
ZIP/Postal Code: {$_POST['zip']}
Subject: {$_POST['subject']}
Message: {$_POST['message']}
Date Of Birth: {$_POST['dateOfBirth']}
Phone Number: {$_POST['phoneNumber']}
Still Working: {$_POST['stillWorking']}
Years Left: {$_POST['yearsLeft']}
";
$subject = $_POST['subject'];
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailheaders .= "From: " . $_POST['firstName'] ." " . $_POST['lastName'] . " <". $_POST['email'] .">\r\n";
$mailheaders .= "Reply-To: " . $_POST['firstName'] ." " . $_POST['lastName'] . " <". $_POST['email'] .">\r\n";
mail("contactus@desiretoretire.com",$subject,stripslashes($message), $mailheaders);
$thanks = "Thanks for contacting us!";
}
}
?>
|
|