-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_user.php
More file actions
69 lines (56 loc) · 1.54 KB
/
Copy pathview_user.php
File metadata and controls
69 lines (56 loc) · 1.54 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
58
59
60
61
62
63
64
65
66
67
68
69
<?php
global $conn;
include "config/database.php";
$sql="SELECT * FROM users";
$result=$conn->query($sql);
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./assets/css/view_user.css">
<title>Add_Users</title>
</head>
<body>
<section>
<h1 >Admin Dashboard</h1>
</section>
<table>
<thead>
<tr style="background-color: #f2f2f2;">
<th >Username</th>
<th >Email</th>
<th >Password</th>
<th >Action</th>
</tr>
</thead>
<tbody>
<?php
if($result->num_rows > 0){
while($row=mysqli_fetch_assoc($result)){
?>
<tr>
<td ><?php echo $row["username"]; ?></td>
<td > <?php echo $row["email"]; ?> </td>
<td > <?php echo $row["password"]; ?> </td>
<td><a href="edit_users.php?id=<?php echo $row["id"]?>"><button type="submit" name="edit" style="width: 60px">EDIT</button></a></td>
</tr>
<?php
}
}
else{
echo"<tr>
<td colspan='4'>No records found</td>
</tr>";
}
?>
</tbody>
</table>
<br><br>
<a href="index.php"> <button type="submit" name="add_users">Add Users</button></a>
<a href="home.php"> <button type="submit" name="home">Home</button></a>
</body>
</html>