<?php include('parent/callMe.php');?>
<?php include('Sessioncheck.php');

$dumy=session_id().session_id().session_id().session_id().session_id();
   
 $q=$_GET["q"];

 if ($q!="" AND $q!=null) {

 $branch=$_SESSION['branch'];
 $query="SELECT * FROM `edu_user_config` where (branch_id='$branch' and status='0') AND (user_fname like '%$q%')  limit 0,15";
  

 $staffs = $m->query($query);

 $data="";
 foreach($staffs as $staff){


	if (strlen($q)>0) {
	

	$id=$staff['user_id'];
	$name=$staff['user_fname'];

		$data=$data . "
		<br>
<div style='padding-left:0.5%;border-bottom:1px solid lightgray;'>
	<a href='issue_return_employee.php?$dumy&emp=$id&qr=$name'>
	 <span> " .$staff['user_fname']." | " .$staff['user_lname']."  </span>
	</a>
</div>
		";



	}
	     
		// Set output to "no suggestion" if no hint was found
		// or to the correct values
		

 }

 if ($data=="") {
	  $data="No Suggestion...";
	} else {
	  $data=$data;
}

 echo $data;


}

?>