-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathallStudents.php
More file actions
25 lines (25 loc) · 823 Bytes
/
allStudents.php
File metadata and controls
25 lines (25 loc) · 823 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
<?php
if (isset($_POST['student'])) {
$query = "SELECT id, firstname, lastname from students";
$result = mysqli_query($link, $query);
if (!$result) {
echo "Error: Unable to get data.";
exit;
}
while ($row = mysqli_fetch_assoc($result))
{
// Looping through the resultset.
$id = $row[id];
$firstname = $row[firstname];
$lastname = $row[lastname];
echo '<section class= "songs">
<h4>'.$id.'</h4>
<ul class="content-item">
<li>'.$firstname.'</li>
<li>'.$lastname.'</li>
</ul>
<button class="btnDelete" data-fbid="${Song.id}">Delete</button>
</section>';
}
}
?>