-
Notifications
You must be signed in to change notification settings - Fork 2
/
view.php
39 lines (37 loc) · 1.05 KB
/
view.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
<?php
// Database connection
include "dbname.php";
// Retrieve employee data
$sql = "SELECT * FROM employees";
$result = mysqli_query($conn, $sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>category</title>
</head>
<body>
<h1>category</h1>
<table>
<tr>
<th>Phone</th>
<th>LED</th>
<th>TV</th>
</tr>
<?php while ($row = mysqli_fetch_assoc($result)): ?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['email']; ?></td>
<td><img src="<?php echo $row['image']; ?>" alt="<?php echo $row['name']; ?>" height="50"></td>
<td>
<a href="edit.php?id=<?php echo $row['id']; ?>">Edit</a>
<a href="delete.php?id=<?php echo $row['id']; ?>">Delete</a>
</td>
</tr>
<?php endwhile; ?>
</table>
</body>
</html>
<?php mysqli_close($conn); ?>