-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_bookings.php
More file actions
23 lines (23 loc) · 844 Bytes
/
view_bookings.php
File metadata and controls
23 lines (23 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require('session.php');
?>
<html>
<body>
<h1>             Your bookings</h1>
<?php
$sql="select locn, start_date,end_date,num_of_guests from hotel_bookings where userid='$user_check'";
$result=mysqli_query($conn,$sql);
if(mysqli_num_rows($result)>0){
echo "<table><tr><th>Location   </th><th>Start date   </th><th>End date   </th><th>Number of guests</th></tr>";
while($row=mysqli_fetch_assoc($result)){
echo"<tr><td>".$row['locn']."</td><td>".$row['start_date']."</td><td>".$row['end_date']."</td><td>".$row['num_of_guests']."</td></tr>";
}
echo "</table>";
}
else{
echo"You have no bookings, $user_check<br>";
}
?><br>
<a href="home.php"> Click here to go back the home page</a>
</body>
</html>