<?php
include 'config.php'; // your DB connection file

if (isset($_GET['station_id'])) {
    $stationId = intval($_GET['station_id']);
    $query = "SELECT * FROM police WHERE pid = $stationId";
    $result = mysqli_query($con, $query);
    
    $police = [];
    while ($row = mysqli_fetch_assoc($result)) {
        $police[] = $row;
    }
    echo json_encode($police);
}
?>