-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathusers.php
54 lines (48 loc) · 1.11 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!-- Shows a list of users and their emails. -->
<?php
include('configure.php');
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="assets/style.css" rel="stylesheet" title="Style" />
<title>List of users</title>
</head>
<head>
<style>
table
{
border-style:solid;
border-width:2px;
border-color:pink;
}
</style>
</head>
<body bgcolor="#EEFDEF">
<body>
<div class="content">
This is the list of members:
<?php
// fetch the IDs, usernames and emails of users
echo "<table border='1'>
<tr>
<th>Id</th>
<th>Username</th>
<th>email</th>
</tr>";
$req = mysqli_query($link, 'select id, username, email from users');
while ($dnn = mysqli_fetch_array($req)) {
?>
<tr>
<td class="left"><?php echo $dnn['id']; ?></td>
<td class="left"><?php echo htmlentities($dnn['username'], ENT_QUOTES, 'UTF-8'); ?></td>
<td class="left"><?php echo htmlentities($dnn['email'], ENT_QUOTES, 'UTF-8'); ?></td>
</tr>
<?php
}
?>
</table>
</div>
<div class="foot"><a href="index.php">Home</a></div>
</body>
</html>