<?php 
require('../config/dbcon.php');
if(isset($_POST['search'])){
    $search = $_POST['search'];
	$query = "SELECT segment_name FROM segment_mst WHERE Lower(segment_name) LIKE Lower('%".$search."%')";
    $result = mysqli_query($connect,$query);	
	while($row = mysqli_fetch_array($result) ){
        $response[] = array("label"=>$row['segment_name']);
    }
    echo json_encode($response);
}
exit;
?>