<?php
session_start();
header('Content-Type: application/json');
require_once 'config.php';

// Get menu data
$sql = "SELECT id, item_name, image_path FROM menu_items WHERE is_available = 1 LIMIT 5";
$result = $conn->query($sql);

$items = [];
while ($row = $result->fetch_assoc()) {
    $items[] = $row;
}

echo json_encode($items, JSON_PRETTY_PRINT);
?>
