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