-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplayuser.php
More file actions
57 lines (50 loc) · 1.2 KB
/
Copy pathdisplayuser.php
File metadata and controls
57 lines (50 loc) · 1.2 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<link rel="stylesheet" href="./table.css">
<style>
body{
background-image: url("./train14.jpg");
height: 100%;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
table{
width: 50%;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body bgcolor="black">
<?php
include "db.php";
$sql = "SELECT * FROM user";
$result = $conn->query($sql);
?>
<table>
<tr>
<th>email</th>
<th>username</th>
<th>password</th>
</tr>
<?php
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo '<tr>';
echo '<td>' . $row['email'] . '</td>';
echo '<td>' . $row['username'] . '</td>';
echo '<td>' . $row['password'] . '</td>';
// echo "<br> trainname: ". $row["trainname"]. " -trainno: ". $row["trainno"]. " -source: " . $row["source"] . " -destination: " . $row["destination"] . " -arrivaltime: " . $row["arrivaltime"] . " -departuretime :" . $row["departuretime"] . "<br>";
echo '</tr>';
}
} else {
echo "0 results";
}
$conn->close();
?>
</table>
</body>
</html>