|
Here is the code:
<?
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$fromemail=$_POST['Email'];
$email = $HTTP_POST_VARS[Email];
$mailto = "--------@yahoo.com";
$mailsubj = "Contact Form";
$mailhead = "From: $fromemail";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form: General Contact Form - www.-------.pro/gen.php/ \n";
while (list ($key, $val) = each ($HTTP_POST_VARS)) { $mailbody .= "$key : $val\n\n"; }
if (!eregi("\n",$HTTP_POST_VARS[Email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); }
echo "<span style='color:#666666'>Your message has been sent & someone will contact you shortly. Thanks for choosing -----.</span>";
}
?>
|