<?php 
include("db_config.php"); 
if($_SERVER['REQUEST_METHOD']=='POST'){
     $country_id = "36";
	$sql="select * from states where id='$country_id' ";
    $result = mysqli_query($conn, $sql);
	
	/* output in necessary format */
	/*$posts = array();
	if(mysqli_num_rows($result)) {
		while($post = mysqli_fetch_assoc($result)) {
			$posts[] = array('post'=>$post);
		}
	}*/
	if(mysqli_num_rows($result) > 0) {
		while($row[] = mysqli_fetch_assoc($result)) {
 
		 $tem = $row;
		 }
	  $response['data']=$tem;
	  $response['status']=1;
	}
	else {
		//$json =  json_encode(array("status" => 0, "msg" => "data Not Found!"));
		$response['status']=0;
	}
	echo json_encode($response);
	mysqli_close($conn);
}