<?php
include "dbinfo.php";

$searchTerm = $_GET['term'];
$data;

	$select =mysqli_query($conn,"SELECT * FROM customer WHERE com_name LIKE '%".$searchTerm."%'")or die(mysqli_error($conn));
	while ($row=mysqli_fetch_array($select)) 
		{
		 $data[] = $row['com_name'];
		}
	//return json data
	echo json_encode($data);

?>

 

