<?php
include_once('common_function.php');
include_once('__data_app_db.php');
include_once('catch.php');

if(isset($_POST["state"])){
 $state = show_jsnj_text($_POST["state"]);
 $query = "SELECT city_name FROM cities where city_state = '".$state."' order by city_name asc";
 $result = mysqli_query($_app_conn_db, $query);
 $len = mysqli_num_rows($result);
 while($row = mysqli_fetch_array($result))
 {

  $data["city"][] = show_jsnj_text($row['city_name']);
 }
    $data["res"][] = 'true';
    $data["len"][] = $len;
 echo json_encode($data);
}




