forked from bharadwajtannu/accomodation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin-dashboard2.php
51 lines (45 loc) · 1.25 KB
/
admin-dashboard2.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
<?php
/*session_start();
if (!isset($_SESSION['admin_logged_in'])) {
header('Location: admin-login.php');
exit;
}*/
include 'connect.php';
$sql = "SELECT * FROM accommodation_bookings";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - Accommodation Bookings</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Admin Dashboard - Accommodation Bookings</h1>
<table>
<tr>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Room Type</th>
</tr>
<?php
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
echo "<tr>
<td>" . $row["name"] . "</td>
<td>" . $row["email"] . "</td>
<td>" . $row["phone"] . "</td>
<td>" . $row["room_type"] . "</td>
</tr>";
}
} else {
echo "<tr><td colspan='4'>No bookings found.</td></tr>";
}
?>
</table>
<a href="logout.php">Logout</a>
</body>
</html>