$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 Ambler Collins website:
".$eol; $body .= "Name: ".$name."
".$eol;
$body .= "Email: ".$email."
".$eol;
$body .= "Home phone: ".$phone."
".$eol;
$body .= "Mobile phone: ".$mobile."
".$eol;
$body .= "Preferred contact time: ".$contact_time."
Area of interest: ".$interest."
".$eol;
$body .= "
Message:
".$eol; $body .= "".nl2br($message)."
".$eol; # Common Headers $headers .= 'From: Ambler CollinsThank you for your application.
Due to the high number of enquiries received we will endeavour to contact you within the next 48-72 hours.
Thank you for your patience in advance.
Ambler Collins
".$eol; $emailsubject = "Thankyou for contacting Ambler Collins"; $emailaddress = $email; $msg = ""; $msg .= $body.$eol.$eol; # SEND THE EMAIL ini_set(sendmail_from,'info@amblercollins.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 = 'enquiry_thanks.php'; header("Location: http://$host$uri/$extra"); //echo $msg; exit; } ?>
|
|||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||