-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfirm_booking_details.php
More file actions
96 lines (87 loc) · 2.8 KB
/
Copy pathconfirm_booking_details.php
File metadata and controls
96 lines (87 loc) · 2.8 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<title>Booking Confirmation</title>
<?php require('inc/links.php'); ?>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
color: #333;
text-align: center;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
img {
width: 100px;
height: 100px;
margin-bottom: 20px;
}
p {
font-size: 18px;
margin-bottom: 20px;
}
.btn {
background-color: #007bff;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
text-decoration: none;
}
.btn:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<?php require('inc/header.php'); ?>
<div class="container">
<?php
if(isset($_POST['checkin']) && isset($_POST['checkout']) && isset($_POST['room_id']) && isset($_POST['name'])) {
$checkin = $_POST['checkin'];
$checkout = $_POST['checkout'];
$room_id = $_POST['room_id'];
$name = $_POST['name'];
echo "<p>Your booking for roomId $room_id is done from $checkin to $checkout.</p>";
echo "<h3>";
echo "Thank you $name for booking with us.";
echo "</h3>";
// Perform any additional processing, such as updating the database, here
echo "
<img src='https://cdn1.iconfinder.com/data/icons/youtuber/256/thumbs-up-like-gesture-512.png'/>
<br>
<p?>Our team will contact you shortly about the main confirmation and payment detail</p>";
} else {
echo "<p>Error: Check-in, check-out dates, or room ID not provided.</p>";
}
?>
<a href="index.php" class="btn">Go to Home Page</a>
</div>
<?php
// session_start();
if(isset($_POST['send'])){
$frm_data = filteration($_POST);
$q = "INSERT INTO `bookings`(`name`, `checkin_date`, `checkout_date`, `room_id`) VALUES (?,?,?,?)";
$values = [$frm_data['name'], $frm_data['checkin'], $frm_data['checkout'], $frm_data['room_id']];
$res = insert($q, $values, 'sssi');
if($res==1){
alert('success','Booking done!');
}
else{
alert('server down, try again later');
}
}
?>
</body>
</html>