-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcomment.php
74 lines (44 loc) · 1.26 KB
/
comment.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
63
64
65
66
67
68
69
70
71
72
73
74
<?php
session_start();
if($_SESSION['email']==true){
}else{
header('location:admin_login.php');
}
$page='comment';
include('include/header.php');
?>
<div style="width: 80%; margin-left:16% ">
<ul class="breadcrumb">
<li class="breadcrumb-item active"><a href="home.php">Home</a></li>>
<li class="breadcrumb-item active">Comment</li>>
</ul>
</div>
<div style=" width:70%;margin-left: 25%; margin-top: 10%">
<h1>Comments</h1>
<hr>
<table class="table table-bordered">
<tr>
<th>Id</th>
<th>Name</th>
<th>Email</th>
<th>Comment</th>
<th>Delete</th>
</tr>
<?php
include('db/connection.php');
$query = mysqli_query($conn,"SELECT * FROM comment");
while($row = mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $row['id']?></td>
<td><?php echo $row['name']?></td>
<td><?php echo $row['email']?></td>
<td><?php echo $row['comment']?></td>
<td><a class="btn btn-danger" href="comment_delete.php?del=<?php echo $row['id']; ?>">Delete</a></td>
</tr>
<?php } ?>
</table>
</div>
<?php
include('include/footer.php');
?>