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

    echo json_encode($response);
}

exit;


