<?php 
   session_start();
    include 'admin/include/connection.php';
	   if(isset($_POST['submit'])){ 

        date_default_timezone_set("Asia/Kolkata");
        $enquiry_date = Date('Y-m-d');
           
 $name = strip_tags(htmlspecialchars($_POST['Name']));
 $phone=strip_tags(htmlspecialchars($_POST['Phone']));
 $email = strip_tags(htmlspecialchars($_POST['email']));
 $desc = strip_tags(htmlspecialchars($_POST['description']));
$location = strip_tags(htmlspecialchars($_POST['location']));
$sub = strip_tags(htmlspecialchars($_POST['sub']));
$to = "samargrandbanquet@gmail.com"; // change this email to your //
$subject = "$sub: $name";
$body = "You have received a new message from your website contact form.\n\n"."Here are the details:\nName: $name\nEmail:$email\n\nPhone : $phone\n\nLocation : $location\n\nMessage: $desc";
$header = "From:$email";
//$header .= "Reply-To: $email";	
if(mail($to,$sub,$body,$header))
{ ?>
  <script>window.location.replace('https://samargrand.in/thank-you.php');</script>
 <?php 
}
  http_response_code(500);
            
       }


?>