forked from Zilleali/Fiverr
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmenu.php
More file actions
49 lines (46 loc) · 1.33 KB
/
menu.php
File metadata and controls
49 lines (46 loc) · 1.33 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
<?php
require("connect.php");
?>
<html>
<thead>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
<title>table</title>
</thead>
<body>
<div class="container mt-2">
<a href="/index.php" class="btn btn-outline-primary text-center">Add User</a>
</div>
<div class="container mt-5">
<table class="table table-bordered ">
<tr class="container bg-light">
<th><b>ID<b></th>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
<th>Password</th>
<th>Edit</th>
<th>Delete</th>
</tr>
</div>
<?php
//READ Operation
$query = "select * from easy";
$users=mysqli_query($con,$query);
// print_r(mysqli_fetch_array($users)); die;
while($user=mysqli_fetch_array($users)){
echo "<tr>
<td>".$user['id']."</td>
<td>".$user['firstname']."</td>
<td>".$user['lastname']."</td>
<td>".$user['email']."</a></td>
<td>".$user['password']."</td>
<td><a href='edit.php?id=".$user['id']."'>Edit</a></td>
<td><a href='delete.php?id=$user[0]'>Delete</a></td>
</tr>";
}
?>
</table>
</body>
</html>