-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewagent_admin.php
executable file
·48 lines (45 loc) · 900 Bytes
/
viewagent_admin.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
<?php
include 'db.php';
include 'adminheader.php';
?>
<html>
<head>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div style="margin-left: 200px;">
<div id="divvhead" ">
View Agent Details
</div >
<div id="divvagent" >
<table border="2">
<tr>
<th>S.NO</th>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
<th>Action</th>
</tr>
<?php
$n = 1;
// Fetch data from the "add_agent" table
$result = mysqli_query($conn, "SELECT * FROM add_agent");
while ($row = mysqli_fetch_array($result)) {
?>
<tr>
<td><?php echo $n++; ?></td>
<td><?php echo $row['agname']; ?></td>
<td><?php echo $row['agemail']; ?></td>
<td><?php echo $row['agphone']; ?></td>
<td><?php echo $row['agplace']; ?></td>
<td><a href="delete_agent.php?id=<?php echo $row['agid']; ?>">Delete</a></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>