<?php
require_once 'config.php';
$res = $conn->query("SELECT offer_name, offer_description, offer_image FROM offers WHERE is_active = 1 ORDER BY id DESC LIMIT 1");
if ($row = $res->fetch_assoc()) {
    echo json_encode(['success' => true, 'offer' => $row]);
} else {
    echo json_encode(['success' => false]);
}
