Server : LiteSpeed System : Linux in-mum-web1949.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 User : u595547767 ( 595547767) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/u595547767/domains/junglebookholidays.in/public_html/ |
<?php
include_once('admin/connect.php');
#BookForm
if(isset($_POST["btnSubmit"]))
{
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$date1=$_POST['datetime'];
$destination=$_POST['destination'];
$message=$_POST['message'];
$subject='Booking Request';
$sql=mysqli_query($con,"INSERT INTO tbl_book (book_name,book_email,book_phone,book_date,book_destination,book_message,book_status) values('$name','$email','$phone','$date1','$destination','$message','booked')");
mysqli_close($con);
$mailto = "info@junglebookholidays.in";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
$headers .= 'From: <info@junglebookholidays.in>' . "\r\n";
$body = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<table border='1'>
<tr>
<th>Name</th>
<td>".$name."</td>
</tr>
<tr>
<th>Email</th>
<td>".$email."</td>
</tr>
<tr>
<th>Phone</th>
<td>".$phone."</td>
</tr>
<tr>
<th>Date</th>
<td>".$date1."</td>
</tr>
<tr>
<th>Destination</th>
<td>".$destination."</td>
</tr>
<tr>
<th>message</th>
<td>".$message."</td>
</tr>
<tr>
</table>
</body>
</html>
";
if($sql){
mail($mailto,$subject,$body,$headers);
echo "<script>alert('Thank you for booking. We will get back to you soon!');</script>";
echo "<script>window.location = 'index.php';</script>";
}
else{
echo "<script>alert('Booking Failed!');</script>";
}
}
?>