/////////////////////// CONTACT US PAGE /////////////////////////////
if ($_POST)
{
$text = "Website Contact Us Page\n\n";
foreach ($_POST as $k => $v)
if ($k != "Submit")
$text .= "$k: $v\n";
print "\"" . mail ("jmaxwell@we-communicate.com", "Website Contact Us", $text, "From: " . eStore_ParseEmail($_POST['name']) . "<" .
eStore_ParseEmail($_POST['email'] . ">")) . "\"";
}
/*********************** ESTORE EMAIL PARSING CODE *************************/
function eStore_ParseEmail($email, $charLimit = 100)
{
$email = str_replace("\\\\", "\\", $email);
if (strpos($email, "\\n") > -1)
{
$email = substr($email, 0, strpos($email, "\\n")); //Removing everything after the \n's
$email = str_replace("\\n", "", $email);
}
if (strpos($email, "\\r") > -1)
{
$email = substr($email, 0, strpos($email, "\\r")); //Removing everything after the \r's
$email = str_replace("\\r", "", $email);
}
if (strpos($email, " ") > -1)
{
$email = substr($email, 0, strpos($email, " ")); //Removing everything after a space
$email = str_replace(" ", "", $email);
}
if (strpos($email, ",") > -1)
{
$email = substr($email, 0, strpos($email, ",")); //Removing everything after the \r's
$email = str_replace(",", "", $email);
}
//Imposing our limit
$email = substr($email, 0, $charLimit);
$email = str_replace("From", "", $email); //Making sure that there is no From
$email = str_replace("Bcc", "", $email); //Making sure that there is no Bcc
$email = str_replace("To", "", $email); //Making sure that there is no To
$email = str_replace("Content-Type", "", $email); //Making sure that there is no Content-Type's in there
$email = str_replace(" ", "", $email); //No spaces
$email = str_replace(":", "", $email);
$email = stripslashes($email);
return $email;
}
?>
Contact St. Louis Strings