<?php
include 'dbc.php';
//get search term
$searchTerm = $_GET['term'];
//get matched data from skills table
$query = $db->query("SELECT * FROM items WHERE item_no LIKE '%".$searchTerm."%'");
while ($row = $query->fetch_assoc()) {
    $data[] = $row['item_no'];
}
//return json data
echo json_encode($data);
?>