-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdisplay.php
More file actions
29 lines (27 loc) · 825 Bytes
/
display.php
File metadata and controls
29 lines (27 loc) · 825 Bytes
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
<?php
include('db_connect.php');
include('navbar.html');
$sql="SELECT * FROM members";
$sendsql=mysqli_query($connect,$sql);
if(mysqli_num_rows($sendsql)>0){
echo"<center><table border=1>";
echo"<tr>";
echo"<th>First Name</th>";
echo"<th>Last Name</th>";
echo"<th>Age</th>";
echo"<th>Contact</th>";
echo"</tr>";
while($rows=mysqli_fetch_array($sendsql)){
echo"<tr>";
echo"<td>".$rows["fname"]."</td>";
echo"<td>".$rows["lname"]."</td>";
echo"<td>".$rows["age"]."</td>";
echo"<td>".$rows["contact"]."</td>";
echo"<td><a href=\"update2.php?id=$rows[id]\">Edit</a> | <a href=\"remove.php?id=$rows[id]\"
onClick=\"return confirm('Are you sure you want to delete?')\">Delete</a></td>";
}
echo "</table></center>";
}else
echo"No Record";
?>
<html>