<?php
// get_latest_notification.php
require_once 'config.php';
$res = $conn->query("SELECT notification_title, notification_description FROM notifications WHERE is_active = 1 ORDER BY id DESC LIMIT 1");
if ($row = $res->fetch_assoc()) {
    echo json_encode(['success' => true, 'notification' => $row]);
} else {
    echo json_encode(['success' => false]);
}
