-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.php
40 lines (38 loc) · 1.09 KB
/
users.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
37
38
39
40
<?php include './includes/header.php'; ?>
<div>
<h3>List of all the users</h3>
<table class="table table-stripped table-hover">
<tr>
<th>S. No.</th>
<th>Avatar</th>
<th>Alias</th>
<th>Username</th>
<th>DTN ID</th>
<th>Edit</th>
<th>Delete</th>
</tr>
<?php
$serial = 1;
$link = connectToDB();
$query = "SELECT * FROM Users WHERE 1";
$users = mysql_query($query, $link);
while($user = mysql_fetch_array($users)) {
echo "<tr>";
echo "<td>{$serial}</td>";
echo "<td><img src=image.php?userId={$user['id']} class=\"img-rounded small-thumbnail\" /></td>";
echo "<td> {$user['alias']}</td>";
echo "<td> {$user['username']}</td>";
echo "<td> {$user['dtn_id']}</td>";
echo "<td><a href=\"./edit_user.php?userID={$user['id']}\">Edit</a></td>";
echo "<td><a href=\"./delete_user.php?userID={$user['id']}\">Delete</a></td>";
echo "</tr>";
$serial++;
}
closeDB($link);
?>
</table>
<br>
<hr>
<a href="./add_user.php">Add a new user</a>
</div>
<?php include './includes/footer.php'; ?>