$action = isset($HTTP_GET_VARS['a']) ? trim($HTTP_GET_VARS['a']) : "";
if ($action == "post") {
$fname = isset($HTTP_POST_VARS['name']) ? trim($HTTP_POST_VARS['name']) : "";
$forg = isset($HTTP_POST_VARS['organization']) ? trim($HTTP_POST_VARS['organization']) : "";
$femail = isset($HTTP_POST_VARS['email']) ? trim($HTTP_POST_VARS['email']) : "";
$fphone = isset($HTTP_POST_VARS['phone']) ? trim($HTTP_POST_VARS['phone']) : "";
$fsubject = isset($HTTP_POST_VARS['subject']) ? trim($HTTP_POST_VARS['subject']) : "";
$fmessage = isset($HTTP_POST_VARS['message']) ? trim($HTTP_POST_VARS['message']) : "";
$referrer = getenv("HTTP_REFERER");
$errors = "";
if ($fname=="") $errors .= "You did not input a name. \n";
if ($femail=="") {
$errors .= "You did not input an email address. \n";
} elseif (!preg_match("/([\w\.\-]+)(\@[\w\.\-]+)(\.[a-z]{2,4})+/i", $femail)) {
$errors .= "The email address you entered was invalid. \n";
}
if ($fsubject=="" || $fsubject=="xxx") {
$errors .= "You did not select a subject. \n";
} else {
if ($fsubject=="question") {
$s1 = " selected";
} elseif ($fsubject=="comment") {
$s2 = " selected";
} elseif ($fsubject=="idea") {
$s3 = " selected";
} elseif ($fsubject=="info") {
$s4 = " selected";
} elseif ($fsubject=="website") {
$s5 = " selected";
}
}
if ($fmessage=="") $errors .= "You did not input a message. \n";
if (get_magic_quotes_gpc()) $fmessage = stripslashes($fmessage);
if ($errors=="") {
$emailtext =
"Celica-GTS.com Contact:\n" .
"Name: $fname\n" .
"Company: $forg\n" .
"Email: $femail\n" .
"Phone: $fphone\n" .
"Subject: $fsubject\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$fmessage .
"\n\n---------------------------------------------------------------------\n" .
"This was generated from a form at: $referrer\n";
mail($mailto, "$subject ($fsubject)", $emailtext, "From: \"$fname\" <$femail>\nReply-To: \"$fname\" <$email>" );
/////////////////////////////////// CONFIRMATION PAGE ///////////////////////////////////
?>
Thank you. The message you submitted to the contact system has been recieved. I will respond as soon as I can. Unfortunately because of my busy schedule I am not able to respond to every message.
To contact me (Steven Benner) simply fill out the form below and click submit. I will attempt to respond to your contact as soon as I can via email. Unfortunately because of the large number of mails and my busy schedule and I am unable to respond to every message.