<?php
require('../config/dbcon.php');
if (isset($_POST['search'])) {
    $search = $_POST['search'];
    $query = "select acc_type,bankname,bankaccno from customer_mst where acc_type = '" . "BAN" . "' and Lower(acc_type) LIKE Lower('%" . $search . "%') or Lower(bankname) LIKE Lower('%" . $search . "%') or Lower(bankaccno) LIKE Lower('%" . $search . "%') order by bankname";
    $result = mysqli_query($connect, $query);
    while ($row = mysqli_fetch_array($result)) {
        $response[] = array("label" => $row['bankname'], "value" => $row['acc_type'],"bankaccno"=>$row['bankaccno']);
    }
    echo json_encode($response);
}
exit;
?>