<?php



include_once 'db_functions.php';     
//ini_set('display_errors', 1);
//ini_set('display_startup_errors', 1);
//error_reporting(E_ALL);
$db = new DB_Functions();  

$ei = $_REQUEST['userid'];    
$users = $db->MyRetailer_list($ei);     
$a = array();     
$b = array(); 
 
   
 if ($users != false){ 
   while($row = mysqli_fetch_array($users)) {
	$b["id"] = $row["locationid"];
  	$b["retailer_code"] = $row["location_code"];
  	$b["retailername"] = $row["locationname"];
  	$b["contactno"] = $row["contactno1"];
	$b["address"]=$row["locationaddress"];
	$b["state"]=$db->getAnyDetails($row['stateid'],"state","stateid","state_master");
	$b["city"]=$db->getAnyDetails($row['cityid'],"city","cityid","city_master");
$b["status"]="Active";
	array_push($a,$b);
   }
   
	
	
 }
 echo json_encode($a);
?>