-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.php
51 lines (43 loc) · 1.78 KB
/
display.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
<?php
$con = mysqli_connect("localhost", "root", "", "srij");
?>
<html>
<body>
<!-- annother -->
<div class="manageMember">
<table border="1" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Member id</th>
<th>Contact</th>
<th>Option</th>
</tr>
</thead>
<tbody>
<?php
$sql = "SELECT * FROM srijtab";
$result = $con->query($sql);
if($result->num_rows>0) {
while($row = $result->fetch_assoc()) {
echo "<tr>
<td>".$row['id']."</td>
<td>".$row['first_name']." ".$row['last_name']."</td>
<td>".$row['member_id']."</td>
<td>".$row['contact']."</td>
<td>
<a href='Action/edit.php?id=".$row['id']."'><button type='button'>Edit</button></a>
<button onclick='asd(".$row["id"].")'>Delete</button>
</td>
</tr>";
}
} else {
echo "<tr><td colspan='5'><center>No Data Avaliable</center></td></tr>";
}
?>
</tbody>
</table>
</div>
</body>
</html>