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