Theatre Masks Ponteland Repertory Society
Error! We are very sorry, but there were error(s) found with the form you submitted.
'; echo "
"; echo $error."

"; echo " <<< Please return here to complete the form.

"; die(); } // validation expected data exists if(!isset($_POST['fullname']) || !isset($_POST['email']) || !isset($_POST['message'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $full_name = $_POST['fullname']; // required $email_from = $_POST['email']; // required $message = $_POST['message']; // required //Added later to remove the addslashes() imposed during the POST process $message= stripslashes($message); //@mail() Seems to work OK with single and double quotes in the message body. $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,$full_name)) { $error_message .= '• The Name you entered does not appear to be valid.
'; } if(strlen($message) < 2) { $error_message .= '• Please leave a message.
'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "Ponteland Rep Website Submitted Form details below.\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "Name: ".clean_string($full_name)."\n"; $email_message .= "Email: ".clean_string($email_from)."\n"; $email_message .= "Message: ".clean_string($message)."\n"; // create email headers $headers = 'From: '.$email_from."\r\n". 'Reply-To: '.$email_from."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); // Send an instant reply generic email below $email_websorter = "websorter@pontelandrep.co.uk"; $headers2 = 'From: '.$email_websorter."\r\n". 'Reply-To: '.$email_websorter."\r\n" . 'X-Mailer: PHP/' . phpversion(); $email_message = " Thank you for contacting Ponteland Repertory Society. This is an automated response and we will be in touch with any information you requested as soon as possible. \n\n http://www.pontelandrep.co.uk"; $email_subject = "Ponteland Repertory Society"; @mail($email_from, $email_subject, $email_message, $headers2); ?>
Success! Message sent.

Thank you for contacting us, you should soon receive an automated email to confirm that your address was correctly recorded.

We will be in touch with you as soon as possible with any information you requested.

<< Back to Ponteland Repertory Society Home Page

 

 

Please use this form to contact us