<?php
header("Content-Type: application/json");
include_once('../../includes/db.php');

$query = "SELECT title, description, image_url FROM onboarding ORDER BY sort_order ASC";
$result = mysqli_query($conn, $query);

$data = [];
while ($row = mysqli_fetch_assoc($result)) {
    $data[] = $row;
}

echo json_encode($data);
