-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewrecords.php
executable file
·36 lines (30 loc) · 1.29 KB
/
viewrecords.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
<?php
$title = 'View Records';
require_once 'includes/header.php';
require_once 'includes/auth_check.php';
require_once 'db/conn.php';
$results = $crud->getAttendees();
?>
<table class="table">
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Specialty</th>
<th>Actions</th>
</tr>
<?php while($r = $results->fetch(PDO::FETCH_ASSOC)) { ?>
<tr>
<td><?php echo $r['attendee_id']?></td>
<td><?php echo $r['firstname']?></td>
<td><?php echo $r['lastname']?></td>
<td><?php echo $r['name']?></td>
<td>
<a href="view.php?id=<?php echo $r['attendee_id']?>" class="btn btn-primary">View</a>
<a href="edit.php?id=<?php echo $r['attendee_id']?>" class="btn btn-warning">Edit</a>
<a onclick="return confirm('Are you sure you want to delete this record?');" href="delete.php?id=<?php echo $r['attendee_id']?>" class="btn btn-danger">Delete</a>
</td>
</tr>
<?php } ?>
</table>
<?php require_once 'includes/footer.php'; ?>