-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview_contact.php
41 lines (40 loc) · 1006 Bytes
/
view_contact.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
<?php
include('admin_nav.php')
?>
<h1 style="text-align: center;">View contact</h1>
<?php
$con=mysqli_connect("localhost","root","","tour") or die("connection failed");
$sql="SELECT * FROM `contact` ORDER BY id ASC";
$result=mysqli_query($con,$sql) or die("Query unsuccessfull.");
if(mysqli_num_rows($result) > 0){
?>
<table class="table table-bordered border-primary center">
<thead class="table-dark">
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Feedback</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<?php
while($rows=mysqli_fetch_assoc($result)){
?>
<tr>
<td><?php echo $rows['id'] ?></td>
<td><?php echo $rows['name'] ?></td>
<td><?php echo $rows['email'] ?></td>
<td><?php echo $rows['feedback'] ?></td>
<td><?php echo $rows['message'] ?></td>
</tr>
</tbody>
<?php } ?>
</table>
<?php } else{
echo "NO Record Found";
}
?>
</body>
</html>