-
Notifications
You must be signed in to change notification settings - Fork 0
/
display.php
63 lines (54 loc) · 1.22 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
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<title>Display</title>
<style>
body{
background: #D071f9;
}
table{
background-color: white;
}
</style>
</head>
</html>
<?php
include("connection.php");
error_reporting(E_ALL);
$query = "select * from form";
$data = mysqli_query($conn , $query);
$total = mysqli_num_rows($data);
//echo $total;
if($total != 0)
{
?>
<h2 align="center"><mark>Display all records</mark></h2>
<center><table border="1" cellspacing="7" width="85%">
<tr>
<th width="10%">First Name</th>
<th width="10%">Last Name</th>
<th width="10%">Gender</th>
<th width="20%">Email</th>
<th width="10%">Phone</th>
<th width="25%">Address</th>
</tr>
<?php
while($result = mysqli_fetch_assoc($data))
{
echo " <tr>
<td>".$result["fname"]."</th>
<td>".$result["lname"]."</td>
<td>".$result["gender"]."</td>
<td>".$result["email"]."</td>
<td>".$result["phone"]."</td>
<td>".$result["address"]."</td>
</tr>
";
}
}
else
{
echo "No record found";
}
?>
</table>
</center>