prepare("SELECT content, color FROM alerts ORDER BY id DESC LIMIT 1"); $stmt->execute(); $alert = $stmt->fetch(PDO::FETCH_ASSOC); if ($alert && !empty(trim($alert['content']))) { $safeContent = htmlspecialchars($alert['content']); $safeColor = htmlspecialchars($alert['color']); echo '
' . $safeContent . '
'; }