Contact Us
Call us now on 0345 337 4751 or enter your details on our contact form for a call back. If you would prefer an email response click here.
require_once('mobile_device_detect.php'); mobile_device_detect(true,false,true,true,true,true,true,'https://www.wfprotection.co.uk/mobile.php',false); $path = $_SERVER['DOCUMENT_ROOT']; $path1 =$path . "/common_classes/db_connection.php"; $path2 =$path . "/common_classes/messages.php"; $path3 =$path . "/classes/show2012.php"; require($path1); require($path2); require($path3); $your_email ='form2@wfprotection.co.uk';// <<=== update to your email address $errors = ''; $name = ''; $tel = ''; $visitor_email = ''; $user_message = ''; if(isset($_POST['submit'])) { $name = $_POST['name']; $tel = $_POST['tel']; $visitor_email = $_POST['email']; $user_message = $_POST['message']; ///------------Do Validations------------- if(empty($name)||empty($visitor_email)) { $errors .= "\n Name and Email are required fields. "; } if(IsInjected($visitor_email)) { $errors .= "\n Bad email value!"; } if(empty($_SESSION['6_letters_code'] ) || strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() $errors .= "\n The captcha code does not match!"; } if(empty($errors)) { //send the email $to = $your_email; $subject="Quick Contact Form"; $from = $your_email; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $body = "$name submitted the contact form:\n\n". "Name: $name\n". "Telephone: $tel \n". "Message: ". "$user_message\n". "IP Address: $ip\n"; $headers = "From: $from \r\n"; $headers .= "Reply-To: $visitor_email \r\n"; mail($to, $subject, $body,$headers); echo''; } } // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } ?>
Your complete Glazing Protection Solution!Call us now on 0345 337 4751 or enter your details on our contact form for a call back. If you would prefer an email response click here.