-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathview_userlist.php
44 lines (36 loc) · 1.45 KB
/
view_userlist.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
41
42
43
44
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
</head>
<body>
<?php
include ("nav.php");
?>
<?php
include('connection.php');
$sql = "select * from users";
$result = mysqli_query($conn, $sql);
//how many rows in the table:
$users = mysqli_num_rows($result);
?>
<div class = "container" style = "padding-top:50px" >
<h2><center> Users</center></h2>
<table class = "table table-striped" border = "1" align = "center">
<th>User Name</th>
<th>Location</th>
<th>User Email</th>
<th>User Picture</th>
<?php
while($rows = mysqli_fetch_array($result)){
echo"<tr>";
echo"<td>"; echo $rows[1];/*username*/; echo"</td>";
echo"<td>"; echo $rows[5];/*Location*/; echo"</td>";
echo"<td>"; echo $rows[2];/*email*/; echo"</td>";
echo"<td><img src = '";echo$rows[6];/*filename, at column 4 in the table*/echo"' height = 100, width = 100></td>";
echo"</tr>";
}
?>
</table>
</div>
</body>
</html>