<?php 
include "../config.php";
if(isset($_POST['search'])){
    $search = $_POST['search'];
    $query = "SELECT * FROM act_master WHERE ac_name like'%".$search."%' GROUP BY ac_name";
    $result = mysqli_query($conn,$query);
    
    while($row = mysqli_fetch_array($result) ){
        $response[] = array("value"=>$row['ac_name'],"label"=>$row['ac_name']);
    }

    echo json_encode($response);
}

exit;


