I have searched almost a month everyday for this. In some cases they use the $.ajax way, in others the $.post way. In jqueryui demo page for autocomplete http://jqueryui.com/demos/autocomplete/ you can see they have a simple understandable way of grabbing the data to show it to the user. Now here comes my problem. Am trying to do a simple, short way of grabbing a list of names from a mysql table. this is what i have right now:
JS
$("#usuario").autocomplete({ source: "search.php", minLength: 3, select: function( event, ui ) {} });
PHP
$nameser = $_POST['usuario'];
$names = '';
$result = mysql_query("SELECT name FROM characters WHERE name LIKE '%$nameser%'");
while ($row = mysql_fetch_array($result)) { $names .= "$row[name]"."
"; }echo $names;
if i send info from the input box to php it returns the search pattern answer correctly But how do i attach the returned information to the autocomplete in a simple way.
The jquery documentation does not provide a simple way of doing it to a php remote file.