<?php
require('includes/application_top.php');
$my_data = tep_db_prepare_input(tep_sanitize_string($_GET['q']));
$my_data = addslashes($my_data);
$append_query = '';
$sql=tep_db_query("SELECT * from customers
	where customers_firstname LIKE '%".$my_data."%' ");
if(tep_db_num_rows($sql))
{
	while($row=tep_db_fetch_array($sql))
	{
		echo '<div class="autocomplete-style customer-badge"><a href="javascript:void(0)" onclick="javascript:selectCustomer('.$row['customers_id'].');"   class="auto_link" style="width:190px;display:block"> <div class="avatar"><img class="user-icon" src="images/user.png" style="height:35px;"> </div> <div class="details"><p class="custmr_name" style="margin-bottom:5px;color:#000000;font-size:15px;">'.$row['customers_firstname'].' ' .$row['customers_lastname'].'</p><p class="cust_email"  style="margin-bottom:5px;font-size:14px;"> '.$row['customers_email_address'].'</p></div></a></div>'."\n";
	}
}
?>