if ($_SERVER['REQUEST_METHOD']=="POST")
{
extract($_POST); // extract variables from the POST array into simple php variables
// check the comments for HTML here
$toMarsh = "goodmama@rogers.com";
$toSteve = "vitruvianergo@rogers.com";
$comments = "Hi Steve,\n\nComments: ".$comments . "\n\nFrom: \n" . $fullName . "\n\nEmail: \n" . $email;
$subject = "~From VitruvianErgonomics.com~" . $subject;
$e1=False;
$e2=False;
$e1=mail($toMarsh,$subject,$comments,"From: $email\n");
$e2=mail($toSteve,$subject,$comments,"From: $email\n");
if ($e1 && $e2 ) // if both emails were sent ok
{
header ("location: contact_thankyou.php");
} else {
//$str= "toMarsh [".$toMarsh."]
subject [".$subject."]
comments [".$comments."]
$email [".$email."]
e1 [".$e1."]
e2 [".$e2."]
Error occured";
//die ($str);
header ("location: contact_error.php");
}
}
$secure = 0;
$secure = rand(1000,9999);
?>