if(isset($_POST["submit"])){ // Checking For Blank Fields.. if($_POST["name"]==""||$_POST["email"]==""||$_POST["message"]==""){ echo "Fill All Fields.."; }else{ $name = $_POST["name"]; // Check if the "Sender's Email" input field is filled out $email=$_POST['email']; // Sanitize E-mail Address $email =filter_var($email, FILTER_SANITIZE_EMAIL); // Validate E-mail Address $email= filter_var($email, FILTER_VALIDATE_EMAIL); if (!$email){ echo "Invalid Sender's Email"; } else{ $to = $email; $subject = "Mess Inquiry "; $head = implode("\r\n", [ "MIME-Version: 1.0", "Content-type: text/html; charset=utf-8" ]); $html = file_get_contents("mailtemplate.html"); // STRING REPLACE $html = str_replace("{NAME}", $name, $html); $html = str_replace("{TIME}", date("Y-m-d H:i:s"), $html); // SEND mail to user mail($to, $subject, $html, $head); echo "Your mail has been sent successfuly ! Thank you for your feedback"; // send mail to admin $admin ='bijila@nivid.co'; $name = $_POST['name']; $phone = $_POST['phone']; $email = $_POST['email']; $messageText = $_POST['message']; $body = "Name: $name\nPhone: $phone\nEmail: $email\nMessage: $messageText"; mail($admin, $subject, $body, $head); } } } ?>
Dubai Technology Entrepreneur Campus, Dubai Silicon Oasis, Dubai, UAE
+971 543 572 643
mealsonwheels@gmail.com
Mon - Fri: 09:00am
to 07.00pm
For all enquires, please contact us and one of our delightful team will be be happy to help.