<?php
include'connection.php';
$search = $_GET['term'];

$select =mysqli_query($cons, "SELECT `Description` FROM `payment` WHERE (`Description` LIKE '%".$search."%' AND `Status` = '0' AND `Action`='SALES') GROUP BY `Description` ORDER BY `Description` ASC");
while ($row=mysqli_fetch_array($select)) 
{
 $data[] = $row['Description'];
}
//return json data
echo json_encode($data);
?>