<?php
require_once 'config.php';
$term=$_POST['q'];
$sql ="select * from vendor_invoice_details where customer_name like '%".$term."%' group by customer_name limit 10";
$query=mysqli_query($con,$sql);
$data=array();
while($result=mysqli_fetch_array($query)){
    $data[]=array(
        "label"=>$result['customer_name'],
        "value"=>$result['customer_name'],
    );
    
}
echo json_encode($data);

?>