//Setup session variables session_name("ior"); session_start(); if (!isset($_SESSION['session_id'])) { $_SESSION['session_id']=""; } //$mailto='stephen@spwebco.com'; $mailto='info@indianoceanrace.com'; if (empty($subject)) { $subject="Website Enquiry"; } $realname=$_POST['realname']; $addr1=$_POST['addr1']; $addr2=$_POST['addr2']; $addr3=$_POST['addr3']; $addr4=$_POST['addr4']; $phone=$_POST['phone']; $email=$_POST['email']; $enquiry=$_POST['enquiry']; $codes=strtolower($_POST['security_code']); $error=false; $success=false; $msg=""; if ($_POST['action']=="Send") { //Process data if (empty($realname)) { $error=true; $msg="Name"; } if (empty($email)) { $error=true; if (!empty($msg)) {$msg.=", ";} $msg.="A valid Email"; } elseif ((!ereg(".+\@.+\..+", $email)) || (!ereg("^[a-zA-Z0-9_@.-]+$", $email))) { $error=true; if (!empty($msg)) {$msg.=", ";} $msg.="A valid Email"; } if (empty($enquiry)) { $error=true; if (!empty($msg)) {$msg.=", ";} $msg.="enquiry"; } // if (md5($codes)!=$_SESSION['security_code']) { // $error=true; // if (!empty($msg)) {$msg.=", ";} // $msg.="correct confirmation code"; // } if (!$error) { //Formulate and send email $bodd = ""; $bodd .= "Enquiry From: \t"; $bodd .= $realname; $bodd .= "\n\n"; $bodd .= "Address: \n"; $bodd .= $addr1; $bodd .= "\n"; $bodd .= $addr2; $bodd .= "\n"; $bodd .= $addr3; $bodd .= "\n"; $bodd .= $addr4; $bodd .= "\n"; $bodd .= "Phone: \t"; $bodd .= $phone; $bodd .= "\n"; $bodd .= "Email Address: \t"; $bodd .= $email; $bodd .= "\n"; $bodd .= "Enquiry: \n"; $bodd .= $enquiry; $bodd .= "\n"; $from="From: $realname <$email>\r\n"; @mail($mailto,$subject,$bodd,$from); $bodd1 = ""; $bodd1 .= "Dear "; $bodd1 .= $realname; $bodd1 .= "\n\n"; $bodd1 .= "The following enquiry has been forwarded to Guy & Andrew and they will be in touch as soon as possible"; $bodd1 .= "\n\n"; $bodd1 .= "Best regards"; $bodd1 .= "\n"; $bodd1 .= "The Indian Ocean Rowing Race 2009"; $bodd1 .= "\n\n"; $bodd1 .= "Your enquiry"; $bodd1 .= "\n============"; $bodd1 .= "\n"; $bodd1 .= $enquiry; $bodd1 .= "\n"; $sender = "The Indian Ocean Rowing Race 2009"; $senderemail = "info@indianoceanrace.com"; $from = "From: $sender <$senderemail>\r\n"; @mail($email,$subject,$bodd1,$from); $success=true; } else { $msg="
£5,096.72 Click Here to Support Our Charity |
||||||||||||||||||||||||||
£76,500.00 Click Here to Sponsor Us |
||||||||||||||||||||||||||
}else{?> Thank youinclude("font.php"); ?>Your enquiry has been sent.We will contact you as soon as possible. |
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||