prepare("UPDATE notifications SET is_read = 1 WHERE user_id = ?"); $stmt->execute([$user_id]); header("Location: ?action=notifications"); exit; } $stmt = $pdo->prepare("SELECT * FROM notifications WHERE user_id = ? ORDER BY created_at DESC"); $stmt->execute([$user_id]); $notifications = $stmt->fetchAll(); ?>
No notifications yet.