<?php 
include '../Admin_config/connection.php';

if (isset($_POST["query"])) 
{
	$output = '';
	
	$sql= "SELECT * FROM `sc_customers` WHERE `cust_fname` LIKE '%".$_POST['query']."%'";
	$result=mysqli_query($conn,$sql);
	$output = '<ul class="list-unstyled" style="background: #ddd;">';
	if (mysqli_num_rows($result) > 0) 
	{
		while ($row = mysqli_fetch_array($result)) 
		{
			$output .= '<li>'.$row["cust_fullname"].'</li>';
		}
	}
	$output .= '</ul>';
	echo $output;
}
?>