<?php
include'connection.php';
$search = $_GET['term'];
$select =mysqli_query($conn, "SELECT `Supplier` FROM `purchase` WHERE (`Supplier` LIKE '%".$search."%' AND `Status` = '0') GROUP BY `Supplier` ORDER BY `Supplier` ASC");
while ($row=mysqli_fetch_array($select)) 
{
 $data[] = $row['Supplier'];
}
//return json data
echo json_encode($data);
?>