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

$select =mysqli_query($conn, "SELECT * FROM `citems` WHERE (`Iname` LIKE '%".$search."%' AND `Status`='0') OR (`Descri` LIKE '%".$search."%' AND `Status` = '0') ORDER BY `Iname` ASC");
while ($row=mysqli_fetch_array($select)) 
{
 $data[] = $row['Iname'];
}
//return json data
echo json_encode($data);
?>