-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_groups.php
More file actions
36 lines (33 loc) · 920 Bytes
/
Copy pathadmin_groups.php
File metadata and controls
36 lines (33 loc) · 920 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
35
36
<?php
include("db.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css\admin_groups.css">
<title>Manage Discussion Groups</title>
</head>
<body>
<h2 style="text-align: center;">All Discussion Groups</h2>
<table>
<tr><th>ID</th><th>Group Name</th><th>Action</th></tr>
<?php
$result = mysqli_query($conn, "SELECT * FROM discussion_groups");
$counter = 0;
while ($row = mysqli_fetch_assoc($result)) {
$rowId = "group_row_" . $counter;
echo "<tr id='{$rowId}'>
<td>{$row['id']}</td>
<td>{$row['group_name']}</td>
<td>
<button class='btn-delete' onclick='deleteGroup({$row['id']}, \"{$rowId}\")'>Delete</button>
</td>
</tr>";
$counter++;
}
?>
</table>
<script src="JS\admin_group.js" ></script>
</body>
</html>