<?php



include_once 'db_functions.php';     

$db = new DB_Functions();  

$ei = $_REQUEST['userid'];
    
$users = $db->getContactBook($ei);     
$a = array();     
$b = array(); 
 
   
 if ($users != false){ 
   while($row = mysqli_fetch_array($users)) {
	$b["id"] = $row["id"];
  
  	$b["retailername"] = $row["retailer_name"];
  	$b["contact_person_name"] = $row["contact_person_name"];
	$b["location"]=$row["location"];
	$b["contact_no"]=$row['contact_no'];
	$b["entry_date"]=$row['entry_date'];

	array_push($a,$b);
   }
   
	
	
 }
 echo json_encode($a);
?>