Jquery UI not working properly for some words

60 views Asked by At
<script type="text/javascript">
$(function() {
$( "#customers" ).autocomplete({
    source: 'search.php'
});
});
</script>
<div class="ui-widget"><input id="customers" name="Cno" placeholder="Customer Name"></div>

search.php

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

search from keyword gulf

enter image description here enter image description here

Please check in first screenshot, Search by Keyword 'gulf' is not showing, But when I search 'gulf r' then it shows data, And I have also attached scrshot of search by keyword 'abd' 3 letters only, Then also it is working properly, But Why is this not working for 'gulf'

0

There are 0 answers