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

Notifications