<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Content-Type');
require_once('../lib/dbclass.php');






$data = findQuery('select * from tbl_district where status=0 order by id asc');











if ($data) {
    for ($i = 0;$i < count($data);$i++) {
        $message = 'true';

        $data2[] = [


                'id'   => $data[$i]['id'],
                'name' => $data[$i]['district_name'],




            ];
    }
} else {
    $message = 'false';
    $data2[] = ['error' => 'Not Found'];
}

echo json_encode(['Status' => $message, 'data' => $data2]);

return;

?>

