-
Notifications
You must be signed in to change notification settings - Fork 0
/
viewadmin.php
60 lines (58 loc) · 1.42 KB
/
viewadmin.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
49
50
51
52
53
54
55
56
57
58
59
60
<?php
session_start();
include("header.php");
include("dbconnection.php");
if(isset($_GET[delid]))
{
$sql ="DELETE FROM admin WHERE adminid='$_GET[delid]'";
$qsql=mysqli_query($con,$sql);
if(mysqli_affected_rows($con) == 1)
{
echo "<script>alert('admin record deleted successfully..');</script>";
}
}
?>
<div class="wrapper col2">
<div id="breadcrumb">View Adminstrator Record</div>
</div>
<div class="wrapper col4">
<div id="container">
<section class="container">
<h2>Search Admin - <input type="search" class="light-table-filter" data-table="order-table" placeholder="Filtrer" /></h2>
<table class="order-table">
<thead>
<tr>
<td width="12%" height="40">Admin Name</td>
<td width="11%">Login ID</td>
<td width="12%">Status</td>
<td width="34%">Action</td>
</tr>
</thead>
<tbody>
<?php
$sql ="SELECT * FROM admin";
$qsql = mysqli_query($con,$sql);
while($rs = mysqli_fetch_array($qsql))
{
echo "<tr>
<td> $rs[adminname]</td>
<td> $rs[loginid]</td>
<td> $rs[status]</td>
<td>
<a href='admin.php?editid=$rs[adminid]'>Edit</a>| <a href='viewadmin.php?delid=$rs[adminid]'>Delete</a> </td>
</tr>";
}
?>
</tbody>
</table>
</section>
<p> </p>
</div>
</div>
</div>
<div class="clear"></div>
</div>
</div>
<?php
include("footer.php");
?>