"; echo $error."

"; echo "Please go back and fix these errors.

"; die(); } // validation expected data exists if(!isset($_POST['store']) || !isset($_POST['contact']) || !isset($_POST['email']) || !isset($_POST['telephone']) || !isset($_POST['date']) || !isset($_POST['i2']) || !isset($_POST['i5']) || !isset($_POST['i11']) || !isset($_POST['i12']) || !isset($_POST['i13']) || !isset($_POST['i14']) || !isset($_POST['i66']) || !isset($_POST['i80']) || !isset($_POST['i81']) || !isset($_POST['comments'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $store = $_POST['store']; // required $contact = $_POST['contact']; // required $email_from = $_POST['email']; // required $telephone = $_POST['telephone']; // required $date = $_POST['date']; // required $i2 = $_POST['i2']; // not required $i5 = $_POST['i5']; // not required $i11 = $_POST['i11']; // not required $i12 = $_POST['i12']; // not required $i13 = $_POST['i13']; // not required $i14 = $_POST['i14']; // not required $i66 = $_POST['i66']; // not required $i80 = $_POST['i80']; // not required $i81 = $_POST['i81']; // not required $comments = $_POST['comments']; // not required $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,$store)) { $error_message .= 'The Store Name you entered does not appear to be valid.
'; } if(!preg_match($string_exp,$contact)) { $error_message .= 'The Last Name you entered does not appear to be valid.
'; } if(strlen($error_message) > 0) { died($error_message); } function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_to = "$email_from, mail@tonypelle.com"; $email_subject = "Country Valley order for " .clean_string($store). " For Delivery ".clean_string($date)."\n"; $email_message = ' Order details below.;
Store
Contact Person

Email Address

Telephone Number

Delivery Date



Description Quantity Item Code
2l Classic Full Cream
2
2l Classic Lite
5
1l Organic Full Cream
11
2l Organic Full Cream
12
1l Organic Lite
13
2l Organic Lite
14
300ml Fresh Cream
66
500gm Lush Natural Yoghurt
80
500gm Lush Plain Yoghurt
81
'; $headers = "From: O'connor IGA \r\n"; $headers = 'MIME-Version:1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $email_from."\r\n". 'Reply-To: '. $email_from."\r\n" . 'X-Mailer: php/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); ?>

Thank you for your order which is shown below.












Description Quantity Item Code
2l Classic Full Cream
2
2l Classic Lite
5
1l Organic Full Cream
11
2l Organic Full Cream
12
1l Organic Lite
13
2l Organic Lite
14
300ml Fresh Cream
66
500gm Lush Natural Yoghurt
80
500gm Lush Plain Yoghurt
81