-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbook.php
More file actions
346 lines (322 loc) · 11.5 KB
/
Copy pathbook.php
File metadata and controls
346 lines (322 loc) · 11.5 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<!DOCTYPE html>
<html>
<head>
<!-- Basic -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Site Metas -->
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<link rel="shortcut icon" href="images/favicon.png" type="">
<title> HungryHub </title>
<!-- bootstrap core css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<!--owl slider stylesheet -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" />
<!-- nice select -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-nice-select/1.1.0/css/nice-select.min.css" integrity="sha512-CruCP+TD3yXzlvvijET8wV5WxxEh5H8P4cmz0RFbKK6FlZ2sYl3AEsKlLPHbniXKSrDdFewhbmBK5skbdsASbQ==" crossorigin="anonymous" />
<!-- font awesome style -->
<link href="css/font-awesome.min.css" rel="stylesheet" />
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet" />
<!-- responsive style -->
<link href="css/responsive.css" rel="stylesheet" />
</head>
<body class="sub_page">
<div class="hero_area">
<div class="bg-box">
<img src="images/hero-bg.jpg" alt="">
</div>
<!-- header section strats -->
<header class="header_section">
<div class="container">
<nav class="navbar navbar-expand-lg custom_nav-container ">
<a class="navbar-brand" href="index.php">
<span>
HungryHub
</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class=""> </span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mx-auto ">
<li class="nav-item">
<a class="nav-link" href="index.php">Home </a>
</li>
<li class="nav-item">
<a class="nav-link" href="menu.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php">About</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="book.php">Book Table <span class="sr-only">(current)</span> </a>
</li>
</ul>
<div class="user_option">
<a href="customer.php" class="user_link">
<i class="fa fa-user" aria-hidden="true"></i>
</a>
<a class="cart_link" href="cart.php">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 456.029 456.029" style="enable-background:new 0 0 456.029 456.029;" xml:space="preserve">
<g>
<g>
<path d="M345.6,338.862c-29.184,0-53.248,23.552-53.248,53.248c0,29.184,23.552,53.248,53.248,53.248
c29.184,0,53.248-23.552,53.248-53.248C398.336,362.926,374.784,338.862,345.6,338.862z" />
</g>
</g>
<g>
<g>
<path d="M439.296,84.91c-1.024,0-2.56-0.512-4.096-0.512H112.64l-5.12-34.304C104.448,27.566,84.992,10.67,61.952,10.67H20.48
C9.216,10.67,0,19.886,0,31.15c0,11.264,9.216,20.48,20.48,20.48h41.472c2.56,0,4.608,2.048,5.12,4.608l31.744,216.064
c4.096,27.136,27.648,47.616,55.296,47.616h212.992c26.624,0,49.664-18.944,55.296-45.056l33.28-166.4
C457.728,97.71,450.56,86.958,439.296,84.91z" />
</g>
</g>
<g>
<g>
<path d="M215.04,389.55c-1.024-28.16-24.576-50.688-52.736-50.688c-29.696,1.536-52.224,26.112-51.2,55.296
c1.024,28.16,24.064,50.688,52.224,50.688h1.024C193.536,443.31,216.576,418.734,215.04,389.55z" />
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>
</a>
<form class="form-inline">
<button class="btn my-2 my-sm-0 nav_search-btn" type="submit">
<i class="fa fa-search" aria-hidden="true"></i>
</button>
</form>
<a href="menu.php" class="order_online">
Order Online
</a>
</div>
</div>
</nav>
</div>
</header>
<!-- end header section -->
</div>
<section class="book_section layout_padding">
<div class="container">
<div class="heading_container">
<h2>
Book A Table
</h2>
</div>
<div class="row">
<div class="col-md-6">
<div class="form_container">
<form action="">
<div>
<input type="text" class="form-control" placeholder="Your Name" />
</div>
<div>
<input type="text" class="form-control" placeholder="Phone Number" />
</div>
<div>
<input type="email" class="form-control" placeholder="Your Email" />
</div>
<div>
<select class="form-control nice-select wide">
<option value="" disabled selected>
How many persons?
</option>
<option value="">
2
</option>
<option value="">
3
</option>
<option value="">
4
</option>
<option value="">
5
</option>
</select>
</div>
<div>
<input type="date" class="form-control">
</div>
<div class="btn_box">
<button type="submit" name="submit">
Book Now
</button>
</div>
</form>
</div>
</div>
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['submit'])) {
// Assuming you have a database connection
$servername = "";
$username = "";
$password = "";
$dbname = "";
$conn = mysqli_connect('localhost', 'root', '', 'final');
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// Get form data
$name = $_POST['Name1'];
$phone = $_POST['Phone'];
$email = $_POST['Email'];
$persons = $_POST['Persons'];
$date = $_POST['Date1'];
// Insert data into the database
$sql = "INSERT INTO Booktable (Name1, Phone, Email, Persons, Date1) VALUES ('$name', '$phone', '$email', '$persons', '$date')";
if (mysqli_query($conn, $sql)) {
echo "Booking successful!";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
}
?>
<div class="col-md-6">
<div class="map_container ">
<div id="googleMap"></div>
</div>
</div>
</div>
</div>
</section>
<!-- end food section -->
<!-- footer section -->
<footer class="footer_section">
<div class="container">
<div class="row">
<div class="col-md-4 footer-col">
<div class="footer_contact">
<h4>
Contact Us
</h4>
<div class="contact_link_box">
<a href="about.php">
<i class="fa fa-map-marker" aria-hidden="true"></i>
<span>
Location
</span>
</a>
<a href="">
<i class="fa fa-phone" aria-hidden="true"></i>
<span>
Call +92 1234567890
</span>
</a>
<a href="">
<i class="fa fa-envelope" aria-hidden="true"></i>
<span>
HungryHub@gmail.com
</span>
</a>
</div>
</div>
</div>
<div class="col-md-4 footer-col">
<div class="footer_detail">
<a href="index.php" class="footer-logo">
HungryHub
</a>
<p>
Follow us on
</p>
<div class="footer_social">
<a href="https://www.facebook.com/">
<i class="fa fa-facebook" aria-hidden="true"></i>
</a>
<a href="https://twitter.com/?lang=en">
<i class="fa fa-twitter" aria-hidden="true"></i>
</a>
<a href="https://www.linkedin.com/">
<i class="fa fa-linkedin" aria-hidden="true"></i>
</a>
<a href="https://www.instagram.com/">
<i class="fa fa-instagram" aria-hidden="true"></i>
</a>
<a href="https://www.pinterest.com/">
<i class="fa fa-pinterest" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
<div class="col-md-4 footer-col">
<h4>
Opening Hours
</h4>
<p>
Everyday
</p>
<p>
10.00 Am -10.00 Pm
</p>
</div>
</div>
<div class="footer-info">
<p>
© <span id="displayYear"></span> All Rights Reserved By
<a href="about.php">HungryHub</a><br><br>
© <span id="displayYear"></span> Distributed By
<a href="https://cms.bahria.edu.pk/Logins/Student/Login.aspx" target="_blank">Ahmed, Ashad, Shahbaz</a>
</p>
</div>
</div>
</footer>
<!-- footer section -->
<!-- jQery -->
<script src="js/jquery-3.4.1.min.js"></script>
<!-- popper js -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
</script>
<!-- bootstrap js -->
<script src="js/bootstrap.js"></script>
<!-- owl slider -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js">
</script>
<!-- isotope js -->
<script src="https://unpkg.com/isotope-layout@3.0.4/dist/isotope.pkgd.min.js"></script>
<!-- nice select -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-nice-select/1.1.0/js/jquery.nice-select.min.js"></script>
<!-- custom js -->
<script src="js/custom.js"></script>
<!-- Google Map -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCh39n5U-4IoWpsVGUHWdqB6puEkhRLdmI&callback=myMap">
</script>
<!-- End Google Map -->
</body>
</html>