<?php 
/**  * Creates fault detail data as JSON  */    
include_once 'db_functions.php';     
$db = new DB_Functions();
$ei=$_REQUEST['eid'];     
$users = $db->getSaleData_User($ei);     
$a = array();     
$b = array();    
if ($users != false){         
while ($row = mysql_fetch_array($users)) 
{                     
$b["id"] = $row["id"];
$b["username"] = $row["user_name"];
$b["imei"] = $row["imei"];
$b["cust_name"] = $row["cust_name"];
$b["contact_no"]=$row["contact_no"];
$b["state"]=$row["state"];
$b["city"]=$row["city"];
$b["sync_date"]=$row["sync_date"];



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