<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
include '../connection.php';

$sql = "SELECT id, name, icon FROM tbl_service_type";
$result = mysqli_query($conn, $sql);

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

echo json_encode(["success" => true, "services" => $services]);
?>
