if (substr($_SERVER["HTTP_REFERER"],0,32) != 'http://www.designventures.com.ph') { echo ""; die(); } $fullname=stripslashes(trim(htmlspecialchars($_POST['fullname']))); $company=stripslashes(trim(htmlspecialchars($_POST['company']))); $position=stripslashes(trim(htmlspecialchars($_POST['position']))); $establish=$_POST['establish']; $address=stripslashes(trim(htmlspecialchars($_POST['address']))); $email=stripslashes(trim(htmlspecialchars($_POST['email']))); $country=stripslashes(trim(htmlspecialchars($_POST['country']))); $phone=stripslashes(trim(htmlspecialchars($_POST['phone']))); $fax=stripslashes(trim(htmlspecialchars($_POST['fax']))); $website=stripslashes(trim(htmlspecialchars($_POST['website']))); $product=stripslashes(trim(htmlspecialchars($_POST['product']))); $others=stripslashes(trim(htmlspecialchars($_POST['others']))); $message=stripslashes(trim(htmlspecialchars($_POST['message']))); $formReferrer=stripslashes(trim(htmlspecialchars($_POST['formReferrer']))); $correctSecurityCode = true; $notifyMsg = ""; //CHECK SECURITY CODE session_start(); if (isset($_POST['SecurityCode'])) { if (md5($_POST['SecurityCode']) != $_SESSION['image_random_value']) { $correctSecurityCode = false; } } //$to="vugh@yahoo.com"; $to="apalao@designventures.com.ph"; $subject="Message from Design Ventures website"; $msg=" Design Ventures Contact Form\n Full Name: $fullname Company: $company Position: $position Address: $address E-mail Address: $email Country: $country Phone: $phone Fax: $fax Website: $website Product: $product Others: $others Country: $country Established as: $establish Message: \n$message (The person who submitted the form came from this page: $formReferrer) "; $from="From: ".ereg_replace("[^A-Za-z ]", "", $fullname)." <$email>"; $success = false; ini_set ("sendmail_from",$from); if ($correctSecurityCode) { if($fullname && $email && $message) { if ( mail($to,$subject,$msg,$from) ) { mail("vugh@yahoo.com", $subject, $msg, $from); $notifyMsg = "
Your message has been sent! Thank you for contacting us. We will get back to you as soon as possible.
"; $success = true; } else { $notifyMsg = "There was an error in sending your message. Please try again.
"; } } } else { $notifyMsg = "Incorrect Security Code. Please try again.
"; } if ( (!$message || !$fullname || !$email) && isset($_POST['Submit']) ) { $notifyMsg .= "Please fill out the required fields.
"; } if ($notifyMsg == "") { $notifyMsg = ""; } ?>
|
|