"; $errorMsg = ""; if (isset($_POST['email'])) // if the form was posted { $subject = "Submitted via the $locationTitle Contact Us page"; $find = array("/bcc\:/i","/Content\-Type\:/i","/cc\:/i","/to\:/i"); $fullName = trim(preg_replace($find, "", stripslashes($_POST['fullName']))); $company = trim(preg_replace($find, "", stripslashes($_POST['company']))); $address = trim(preg_replace($find, "", stripslashes($_POST['address']))); $phone = trim(preg_replace($find, "", stripslashes($_POST['phone']))); $email = trim(preg_replace($find, "", stripslashes($_POST['email']))); $details = trim(preg_replace($find, "", stripslashes($_POST['details']))); if ($fullName == '' || $phone == '' || $email == '') { $errorMsg = "Please fill out name, phone and email fields prior to submitting the form"; } elseif ($fullName == $company || $company == $address || $address == $phone || $phone == $email || $email == $details) { // probably phisher, do nothing header('Location: ' . $_SERVER['PHP_SELF']); die(); } else // go ahead and process the form { $messageToSend = 'A visitor has sent email using the contact form on ' . $_SERVER["HTTP_HOST"] . ' Here is the information they submitted: --------------------------------------- Name: ' . stripslashes($fullName) . " "; if ($company != '') { $messageToSend .= "Company: " . stripslashes($company) . " "; } if ($address != '') { $messageToSend .= "Address: " . stripslashes($address) . " "; } if ($phone != '') { $messageToSend .= "Phone: " . stripslashes($phone) . " "; } if ($email != '') { $messageToSend .= "Email: " . stripslashes($email) . " "; } if ($details != '') { $messageToSend .= ' --------------------------------------- Message: '.stripslashes($details).' '; } $headers = "From: " . $fromAddress . " <" . $fromAddress . ">\r\n"; @mail($toAddress, $subject, $messageToSend, $headers); //echo "mail($toAddress, $subject, $messageToSend, $headers);"; //exit; // hide the form, show the love $step1open = ""; $step2open = ""; $step2close = ""; } } ?>
|
||||||||||||||||||||||||||
|
Thank you for your interest in . Please contact us if you have any questions/comments. |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| spa and salon websites by accelerator enterprise technologies |