prepare("INSERT INTO comments (page_id, user_id, comment) VALUES (?, ?, ?)"); $stmt->bind_param("sss", $page_id, $user_id, $comment); if ($stmt->execute()) { header("Location: " . $_SERVER['REQUEST_URI']); exit; } } } // Fetch comments $stmt = $conn->prepare("SELECT user_id, comment, created_at FROM comments WHERE page_id = ? ORDER BY created_at DESC"); $stmt->bind_param("s", $page_id); $stmt->execute(); $result = $stmt->get_result(); ?>
= getFullName($row['user_id']); ?>
MEMBER= nl2br(htmlspecialchars($row['comment'])) ?>