"; $str.= $error."

"; $str.= "Please fix these errors and try again.

"; $name = $_POST['name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // not required $comments = $_POST['comments']; // required $arrive = $_POST['arrive']; // required $depart = $_POST['depart']; // required return $str; } function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } // validation expected data exists if(!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['comments'])) { $message = run_error('We are sorry, but there appears to be a problem with the form you submitted.'); } $name = $_POST['name']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // not required $comments = $_POST['comments']; // required $arrive = $_POST['arrive']; // required $depart = $_POST['depart']; // required $email_subject = 'Enquiry via '.$name.' OxfordHolidayHome.co.uk'; $error_message = ""; $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; if(!preg_match($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.
'; } $string_exp = "/^[A-Za-z .'-]+$/"; if(!preg_match($string_exp,$name)) { $error_message .= 'The Name you entered does not appear to be valid.
'; } if(strlen($comments) < 2) { $error_message .= 'The Comments you entered do not appear to be valid.
'; } if(strlen($error_message) > 0) { $message = run_error($error_message); } else{ $email_message = "Please reply to this enquiry sent from http://oxfordholidayhome.co.uk.\n\n"; $email_message .= "Name: ".clean_string($name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Telephone: ".clean_string($telephone)."\n"; $email_message .= "Arrive: ".clean_string($arrive)."\n"; $email_message .= "Depart: ".clean_string($depart)."\n\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = "From: ".$name." "."\r\n"; $headers .= 'Reply-To: '.$from_email. "\r\n"; mail($email_to, $email_subject, $email_message, $headers); //echo $email_to.'-----'.$email_subject.'-----'.$email_message.'-----'.htmlentities($headers); $message = 'Thank you for contacting us. We will be in touch with you very soon.'; } } ?> Contact - Oxford holiday home

Contact us

Jake - property ownerPlease telephone or email us so we can help you rent our home in Oxford!

Telephone: 01993 811711 (from UK)

Telephone: +44 1993 811711 (from overseas)

Alternatively, complete this form below...

'.$message.'
'; } ?>
Your name*
Email*
Telephone
Arrival date
Departure date
Comments