prepare("SELECT love_wall.id, love_wall.content, users.username FROM love_wall JOIN users ON love_wall.user_id = users.id ORDER BY love_wall.created_at DESC");
$stmt->execute();
while ($row = $stmt->fetch()) {
echo "
" . htmlspecialchars($row['username']) . ": " . htmlspecialchars($row['content']) . "
";
echo "";
if (isset($_SESSION['user_id'])) {
echo "";
}
echo "
";
}
?>