<?php
require_once("connect.php");
$term=$_GET["term"];
$query=mysqli_query($con,"SELECT * FROM employee where (emp_id like '%".$term."%') OR (emp_pid like '%".$term."%') order by emp_id ");
$json=array();
while($emp=mysqli_fetch_array($query,MYSQLI_ASSOC)){
$json[]=array(
'value'=> $emp["emp_id"]." - ".$emp["emp_name"],
'label'=>$emp["emp_id"]." - ".$emp["emp_name"]
);
}
echo json_encode($json);
?>