<?php 
include "../config.php";
if(isset($_POST['search'])){
    $search = $_POST['search'];
    $query = "SELECT * FROM lhc WHERE to_place like'%".$search."%' AND company_id = '".$_SESSION['company_id']."' AND branch_id = '".$_SESSION['branch_id']."' GROUP BY to_place";
    $result = mysqli_query($conn,$query);
    while($row = mysqli_fetch_array($result) ){
        $response[] = array("value"=>$row['to_place'],"label"=>$row['to_place']);
    }
	echo json_encode($response);
}
exit;


