if(!$submitted){
$submitted =date('m/d/Y');
echo"
If you have any questions regarding our products or services, please contact us by calling or e-mailing us and we will get back to you as soon as possible. We look forward to hearing from you.
";
}else{
$check = "no_errors";
if($check == "no_errors"){
$to = "webmaster@sitecompany.com";
$from="$email";
$subject = "Website Question";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: " . $from . "\n" . "Return-Path: " . $from . "\n" . "Reply-To: " . $from . "\n";
$body="
Website Question
";
foreach ( $_REQUEST as $ind=>$val ){
//Change line breaks is shipping address to HTML line Breaks
if($ind=="shipping_address"){
$val = str_replace ("\n", " ", $val);
}
$body .= "$ind | $val | ";
}
$body.=" ";
if (mail($to, $subject, $body, $headers))
{
echo"Submission Successfull";
if($email){
echo"
A confirmation email is being sent to $email.
You will be contacted at this address.
";
}
}else{
echo(" Order Submission Failed");
}
if($email){
//Confirmation EMAIL
$to="$email";
$from="webmaster@sitecompany.com";
$subject="GL Capasso Question Confirmation";
$body="This email is to confirm the successfull submission of your question or comment .\n\n
";
$headers = "From: " . $from . "\n" . "Return-Path: " . $from . "\n" . "Reply-To: " . $from . "\n";
mail($to, $subject, $body, $headers);
}
//Notify Webmaster EMAIL
$to="webmaster@sitecompany.com";
$from="$email";
$subject="Notification";
foreach ( $_REQUEST as $ind=>$val ){
//Change line breaks is shipping address to HTML line Breaks
if($ind=="shipping_address"){
}
$notif_body .= "$ind | $val\n";
}
$headers = "From: " . $from . "\n" . "Return-Path: " . $from . "\n" . "Reply-To: " . $from . "\n";
mail($to, $subject, $notif_body, $headers);
}else{
echo"$errors";
}
}
?>
|