-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbookingg.php
More file actions
45 lines (29 loc) · 716 Bytes
/
bookingg.php
File metadata and controls
45 lines (29 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<html>
<?php
$host="localhost";
$dbuser="root";
$pass="";
$dbname="prj";
$conn=mysqli_connect($host,$dbuser,$pass,$dbname);
if(mysqli_connect_errno())
{
die("not connected to server" . mysqli_connect_error());
}
$Customer_name = $_POST["Name"];
$Customer_email= $_POST["email"];
$CMobile = $_POST["mobile"];
$city= $_POST["city"];
$CTable=$_POST["table"];
$sql="INSERT INTO table_info(CName,CEmail,CMob,City,CTable_Inf)VALUES('$Customer_name','$Customer_email','$CMobile', '$city','$CTable')";
if(!mysqli_query($conn,$sql))
{
echo "BOOKING NOT CONFIRMED";
header("refresh:5;url=booking.html");
}
else
{
echo"YOUR TABLE HAS BEEN BOOKED";
header("refresh:5;url=reviews.html");
}
?>
</html>