<?php  
include "../config.php";
if(isset($_GET['term'])){
	$code  = $_GET['term'];
	
	$query = mysqli_query($conn, "SELECT * FROM act_master WHERE `ac_name` like '%".$code."%'");
	$count = mysqli_num_rows($query);
	if (!empty($count)) {
		while($row = mysqli_fetch_assoc($query) ){
			
			$response[] = array("label"=>$row['ac_name'],"id"=>$row['id'],"code"=>$row['act_code']);
		}
	}

	echo json_encode($response);
}
exit;
?>