<?php 
include "../config.php";
if(isset($_POST['search'])){
    $search = $_POST['search'];
    $query = "SELECT DISTINCT from_place FROM lr_mst WHERE from_place LIKE '%".$search."%'";
    $result = mysqli_query($conn,$query);
    
    while($row = mysqli_fetch_array($result) ){
        $response[] = array("value"=>$row['from_place'],"label"=>$row['from_place']);
    }

    echo json_encode($response);
}

exit;


