<?php
$q = $_GET["q"];
echo"
<form onSubmit='return false'>
<input type='text' name='q' value='$q' onkeyup='searchSuggestion(this.value)'>
</form>
<div id='txtHint'></div>
";
?>
I’m trying to customize this script example from w3scool but have some problem with it.. It use php, ajax and ? Javascript
http://www.w3schools.com/php/php_ajax_database.asp
Instead of select menu I change it to a simple text field, it work but when field is empty it show all records from db. How can hide result table when field is empty and prevent it to show all record?
Aslo it gets records soon something is typed but I want minimum value 3 before it get records from db. Is it posible?