-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_users.php
More file actions
37 lines (34 loc) · 1.01 KB
/
list_users.php
File metadata and controls
37 lines (34 loc) · 1.01 KB
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
<h3 class="text-center text-primary">All Users</h3>
<table class="table table-bordered mt-5">
<thead class="text-center">
<?php
$get_users="SELECT * FROM `users`";
$result=mysqli_query($conn,$get_users);
$row_count=mysqli_num_rows($result);
if($row_count==0){
echo "<h2 class='bg-danger text-center'>No users yet</h2>";
}else{
echo"
<tr>
<th>S.No.</th>
<th>Username</th>
<th>User Email</th>
</tr>
</thead>
<tbody class='text-center'>";
$number=0;
while($row_data=mysqli_fetch_assoc($result)){
$user_id=$row_data['UserID'];
$username=$row_data['Username'];
$user_email=$row_data['Email'];
$number++;
echo"<tr>
<td>$number</td>
<td>$username</td>
<td>$user_email</td>
</tr>";
}
}
?>
</tbody>
</table>