-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_viewcustomer.php
More file actions
51 lines (39 loc) · 1.18 KB
/
Copy pathadmin_viewcustomer.php
File metadata and controls
51 lines (39 loc) · 1.18 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="admin.css">
</head>
</html>
<?php
require_once ('mysql_handle.php');
include ("header.html");
include ("admin_auth.php");
echo '<h1>Reservation</h1>';
$query = "SELECT * FROM roomBooking";
$result = mysqli_query($conn, $query);
$num = mysqli_num_rows($result);
if ($num > 0) {
echo '<table>
<tr>
<td><b>ID</b></td>
<td><b>Arrival</b></td>
<td><b>Departure</b></td>
<td><b>Room Preference</b></td>
</tr>';
while ($row = mysqli_fetch_assoc($result)) {
echo '<tr>
<td><a href="admin_reservecustomer.php?id=' . $row['reserve_id']
. '">'. $row['email'] .'</td>
<td>' . $row['arrival_date'] . '</td>
<td>' . $row['depart_time'] . '</td>
<td>' . $row['roomType'] . '</td>
</tr>';
}
'</table>';
mysqli_free_result($result);
}
else {
echo '<p> There are currently no reserved cutomer. </p>';
}
mysqli_close($conn);
?>