<?php
include('../includes/db.php');

header('Content-Type: application/json');

$response = array('success' => false, 'school' => array());

// Get school details
$query = "SELECT * FROM schools LIMIT 1";
$result = $conn->query($query);

if($result->num_rows > 0) {
    $response['school'] = $result->fetch_assoc();
    $response['success'] = true;
} else {
    $response['error'] = "No school details found";
}

echo json_encode($response);
?>