<?php include_once("class/class.MySQL.php");
$db	=new MySQL();


if ( !isset($_GET['term']) )
    exit;
    $term = $_GET['term'];
//$term='reshma2321@gmail.com';
        $data = array();
    
 $sql =$db->fetchQuery('select * from employee where e_id!=1 and  (e_fname like "'. mysql_real_escape_string($term) .'%" ) order by e_fname asc limit 0,10');
 
 
            foreach( $sql as $row )
            {
                $data[] = array(
                    'label' => $row['e_fname'],
					'lbl'=>$row['e_id'],
					//'label' => $row->name,
                    'value' => $row['e_fname']);   // here taking name as value so it will display name in text field, you can change it as per your choice.
            }
  // print_r($rows['user_name']);
  echo json_encode($data);
        flush();
	
	?>