JQuery UI Autocomplete returning all values
I have the following code:
$("#auto").autocomplete({ source: "js/search.php", minLength: "3" });
This code is assign to an input text box where i type a name and after 3 letters it should return the ones that have similar letters. For my case it is returning all values, even those not related to the 3 letters already typed. My question is:
How to send my search.php file the value inside the input so it should know what to search for. For the moment it searches for everything. I checked the value that was going to php and it was empty. Since the query to mysql uses LIKE '%VARIABLE%' and the variable is empty it searches for '%%' which is a开发者_JAVA百科ll cases.
How can i send the correct informacion from JS to PHP with the simplest form.
Here is the explanation : http://www.simonbattersby.com/blog/jquery-ui-autocomplete-with-a-remote-database-and-php/
Regards
精彩评论