<?php
require_once("../dbconfig.php");
if(!empty($_POST["keyword"])) {
$query ="SELECT * FROM customers WHERE name like '%" . $_POST["keyword"] . "%' ORDER BY name LIMIT 0,6";

$result = $con->query($query);
$rowcount=mysqli_num_rows($result);
//echo $rowcount;
if($rowcount>0) {
?>
<ul  class="list-group" id="passenger_name-list">
<?php
foreach($result as $customer) {
?>
<!--li style="cursor: pointer; width:250px;font-family:Montserrat; font-size:12px; font-weight:bold; color:#FBF2F2; padding:10px; background-color:#05629E;" onClick="selectCustomer('<?php// echo $customer["id"].'-'.$customer["name"]." - ".$customer["address1"]." - ".$customer["post_code"]." - ".$customer["phone"]." - ".$customer["email"]." - ".$customer["client_reference"]; ?>');"><?php //echo $customer["name"]." - ".$customer["post_code"]; ?></li-->

<li style="cursor: pointer; width:250px;font-family:Montserrat; font-size:12px; font-weight:bold; color:#FBF2F2; padding:10px; background-color:#05629E;" onClick="selectCustomer('<?php echo $customer["id"].'-'.$customer["name"]." - ".$customer["address1"]." - ".$customer["post_code"]." - ".$customer["phone"]." - ".$customer["email"]; ?>');"><?php echo $customer["name"]." - ".$customer["post_code"]; ?></li>

<?php } ?>
<script>
 $('#new_customer').hide();
 
 

</script>

<?php }

echo '</ul>';

 } ?>
