$value) {
$$key = $value;
//echo $key." = ".$value."
";
if (stristr($value,"Content-Type")) {
header("HTTP/1.0 403 Forbidden");
echo "Unauthorised content has been added to the form input.";
exit;
}
}
if (strtoupper(substr(PHP_OS,0,3)=='WIN')) {
$eol="\r\n";
} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {
$eol="\r";
} else {
$eol="\n";
}
$body = "".$eol;
$body .= "
The following message has been received from the Giles & Posner website:
".$eol;
$body .= "Enquiry subject: ".$subject."
".$eol;
$body .= "Message:
".$eol;
$body .= nl2br($message)."
".$eol;
$body .= "Received from: ".$name."
".$eol;
$body .= "Email: ".$email."
".$eol;
$body .= "Telephone: ".$phone."
".$eol;
# Common Headers
$headers .= 'From: Giles and Posner '.$eol;
$headers .= 'Reply-To: Giles and Posner '.$eol;
$headers .= 'Return-Path: Giles and Posner '.$eol; // these two to set reply address
$headers .= "Message-ID: <".time().rand(1,1000)." TheSystem@".$_SERVER['SERVER_NAME'].">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol; // These two to help avoid spam-filters
$headers .= 'MIME-Version: 1.0'.$eol;
$headers .= "Content-Type: text/html; charset=\"ISO-8859-1\"".$eol.$eol;
$emailaddress = "sales@gilesandposner.com";
$emailsubject = "Website contact: ".$subject;
$msg = "";
$msg .= $body.$eol.$eol;
# SEND THE EMAIL
ini_set(sendmail_from,'sales@gilesandposner.com'); // the INI lines are to force the From Address to be used !
mail($emailaddress, $emailsubject, $msg, $headers);
ini_restore(sendmail_from);
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$extra = 'ContactThanks.htm';
header("Location: http://$host$uri/$extra");
exit;
}
?>
Contact Giles & Posner | Chocolate Fountains & fondue chocolate
|
|
| |
All images are copyright protected 2006 © and are the property of Giles & Posner Limited. |
|
|