-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_roomreserv.php
75 lines (70 loc) · 2.13 KB
/
admin_roomreserv.php
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
<?php
include("database.php");
$que = "SELECT * FROM hotel_guest";
$result = mysqli_query($db, $que);
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style1.css">
<style>
table,
td,
th {
border: 1px solid black;
}
table {
border-collapse: collapse;
width: 100%;
}
center {
margin-left: auto;
margin-right: auto;
}
td {
text-align: center;
}
body {
background-color: azure;
}
</style>
</head>
<body>
<h1 class="heading-title"> Hotel Reservation Bookings </h1>
<table border="5" cellspacing="5" cellpadding="5">
<tr class="center">
<th>No.</th>
<th>ID</th>
<th>FirstName</th>
<th>Last Name</th>
<th>Address</th>
<th>Contact Number</th>
<th>Room Type</th>
<th>Check In</th>
<th>Check Out</th>
</tr>
<?php
$i = 1;
if ($num = mysqli_num_rows($result) > 0) {
while ($run = mysqli_fetch_assoc($result)) {
echo "
<tr class='data'>
<td>" . $i++ . "</td>
<td>" . $run['guest_id'] . "</td>
<td>" . $run['firstname'] . "</td>
<td>" . $run['lastname'] . "</td>
<td>" . $run['address'] . "</td>
<td>" . $run['contactno'] . "</td>
<td>" . $run['room_type'] . "</td>
<td>" . $run['check_in'] . "</td>
<td>" . $run['check_out'] . "</td>
<td><a href='delete_guest.php?id=" . $run['guest_id'] . "' id='btn'>Delete</a></td>
</tr>
";
}
}
?>
</table>
</br><a id="a6" href="admin.php" onclick="myFunction(document.getElementById(this.id))">Back</a>
</body>
</html>