';
exit;
}
foreach ($_POST as $key => $value) {
$_POST[$key] = preg_replace("/[^a-z0-9\.\!\@\#\$\,\?\-\s]+/i", ' ', $value);
}
$date = date("F j, Y, g:i a");
$email_body = <<< EMAIL_BODY
The following user completed a contact form on your website.
Do Not Reply To This Email.
Date: $date
First Name: $_POST[fname]
Last Name: $_POST[lname]
Phone: $_POST[phone]
Email: $_POST[email]
Street Address: $_POST[address]
City: $_POST[city]
State: $_POST[state]
Zip: $_POST[zip]
Buyer: $_POST[buyer]
Seller: $_POST[seller]
Comments: $_POST[comments]
EMAIL_BODY;
// Modify These Two Fields to Customize for Different Websites
$agent_name = 'Gary Mcadams';
$agent_email = 'garymcadams@bellsouth.net';
$website = $_SERVER['SERVER_NAME'];
$to = "$agent_name<$agent_email>";
$subject = "$website Form Submission";
$headers = "From: Do Not Reply\r\n";
$headers .= "X-Mailer: PHP v".phpversion()."\r\n";
@mail($to, $subject, $email_body, $headers);
print '
We have received your information and will be contacting you shortly
';
}
else{
?>
We appreciate you as a customer and will respond
asap!