-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemberList.php
More file actions
34 lines (27 loc) · 872 Bytes
/
memberList.php
File metadata and controls
34 lines (27 loc) · 872 Bytes
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
<!-- Q4 -->
<?php
$title = "List All Members";
require_once('head.php');
echo "<body>";
echo "<h2> List All Members </h2>";
$conn = mysqli_connect('localhost', 'root', 'password', 'canary');
$query = "SELECT * FROM member";
$result = mysqli_query($conn, $query);
echo "<table>";
echo "<tr> <th> ID </th> <th> First Name </th> <th> Last Name </th> <th> Grade </th></tr>";
while ($row = mysqli_fetch_assoc($result))
{
echo "<tr>";
echo "<td>".$row['memberID']."</td>";
echo "<td>".$row['firstName']."</td>";
echo "<td>".$row['lastName']."</td>";
echo "<td>".$row['grade']."</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($conn);
echo "<a href='Index.php'> Back To Index </a>";
require_once('footer.php');
echo "</body>";
echo "</html>";
?>