<?php
// Database connection
include('../connection.php');

$sql = "SELECT * FROM civil_court_officials";
$result = $conn->query($sql);

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

echo json_encode($officials);

$conn->close();
?>
