session_start(); require_once("../applib/class.phpmailer.php"); $pattern = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/'; $to_email = "ahmed.mansour@lateston.ae,anse@lateston.ae"; if(isset($_POST["txtName"])){ $name = $_POST['txtName']; $subject = $_POST['txtSubject']; $email = $_POST['txtEmail']; $mobile = $_POST['txtMobile']; $desc = $_POST['txtDescription']; if(filter_var($email, FILTER_VALIDATE_EMAIL) === false) { header("location:contact-us.php"); exit; } if($email == "" || !preg_match($pattern,$email)) { header("location:contact-us.php"); exit; } if($name !='' && $subject !='' && $email !='' && $mobile!='' && $desc!=''){ $body = '
Subject : | '.$subject.' |
Customer Name : | '.$name.' |
Contact # | '.$mobile.' |
Email : | '.$email.' |
Description : | '.$desc.' |