-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview_comment.php
More file actions
23 lines (19 loc) · 910 Bytes
/
Copy pathview_comment.php
File metadata and controls
23 lines (19 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include "includes/db.php";
$id = intval($_GET['id']);
$comment = $conn->query("
SELECT c.*, b.title
FROM blog_comments c
LEFT JOIN blog b ON b.blog_id = c.blog_id
WHERE comment_id = $id
")->fetch_assoc();
?>
<h2>Comment Details</h2>
<p><strong>Post:</strong> <?php echo $comment['title']; ?></p>
<p><strong>Name:</strong> <?php echo $comment['commenter_name']; ?></p>
<p><strong>Email:</strong> <?php echo $comment['commenter_email']; ?></p>
<p><strong>Comment:</strong><br> <?php echo nl2br($comment['comment_text']); ?></p>
<p><strong>Date:</strong> <?php echo $comment['date_posted']; ?></p>
<p><strong>Status:</strong> <?php echo ucfirst($comment['status']); ?></p>
<a href="approve_comment.php?id=<?php echo $comment['comment_id']; ?>" class="btn btn-success">Approve</a>
<a href="delete_comment.php?id=<?php echo $comment['comment_id']; ?>" class="btn btn-danger">Delete</a>