ez-site/apis/load_love_wall.php
2024-10-19 21:33:47 +08:00

9 lines
319 B
PHP

<?php
include 'db.php';
$stmt = $pdo->query("SELECT love_wall.content, users.username FROM love_wall JOIN users ON love_wall.user_id = users.id ORDER BY love_wall.created_at DESC");
while ($row = $stmt->fetch()) {
echo "<div class='love-message'><strong>{$row['username']}:</strong> {$row['content']}</div>";
}
?>