-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
46 lines (44 loc) · 1.36 KB
/
Copy pathindex.php
File metadata and controls
46 lines (44 loc) · 1.36 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
<?php
include 'db.php';
// Fetch all appointments
$appointments = $conn->query("SELECT * FROM appointments");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Appointment Scheduler</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Appointment Scheduler</h1>
<a href="add_appointment.php" class="btn">Add New Appointment</a>
<table>
<thead>
<tr>
<th>ID</th>
<th>Client Name</th>
<th>Service</th>
<th>Date</th>
<th>Time</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php while ($row = $appointments->fetch_assoc()): ?>
<tr>
<td><?= $row['id'] ?></td>
<td><?= $row['client_name'] ?></td>
<td><?= $row['service'] ?></td>
<td><?= $row['appointment_date'] ?></td>
<td><?= $row['appointment_time'] ?></td>
<td>
<a href="edit_appointment.php?id=<?= $row['id'] ?>" class="btn">Edit</a>
<a href="delete_appointment.php?id=<?= $row['id'] ?>" class="btn btn-delete">Delete</a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</body>
</html>