<?php
require('../config/dbcon.php'); //connect
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    $query = "Select description from status_mst where Lower(description) LIKE Lower('%" . $search . "%') order by description DESC limit 10";
    $result = mysqli_query($connect, $query);
    while ($row = mysqli_fetch_array($result)) {
        $response[] = array("label" => $row['description'], "description" => $row['description']);
    }
    echo json_encode($response);
}
exit;
