<?php 
require dirname( dirname(__FILE__) ).'/inc/Config.php';
$data = json_decode(file_get_contents('php://input'), true);
$uid = $data['uid'];
header('Content-type: text/json');
if($uid == '')
{
	$returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Something Went wrong  try again !");
}
else 
{
	
	$count = $lundry->query("select * from tbl_address where uid=".$uid."")->num_rows;
	if($count != 0)
	{
	$cy = $lundry->query("select * from tbl_address where uid=".$uid."");
	$p = array();
	$q = array();
	while($adata = $cy->fetch_assoc())
	{
		$p['id'] = $adata['id'];
		$p['uid'] = $adata['uid'];
		$p['address'] = $adata['address'];
		$p['landmark'] = $adata['landmark'];
		$p['r_instruction'] = $adata['r_instruction'];
		$p['a_type'] = $adata['a_type'];
		$p['a_lat'] = $adata['a_lat'];
		$p['a_long'] = $adata['a_long'];
		$q[] = $p;
	}
	$returnArr = array("ResponseCode"=>"200","Result"=>"true","ResponseMsg"=>"Address List Get Successfully!!!","AddressList"=>$q);
	}
	else 
	{
		$returnArr = array("ResponseCode"=>"401","Result"=>"false","ResponseMsg"=>"Address List Not Found!!","AddressList"=>[]);
	}
}
echo  json_encode($returnArr);


?>