Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3497270
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:21:00+00:00 2026-05-18T12:21:00+00:00

I have searched almost a month everyday for this. In some cases they use

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:21:01+00:00Added an answer on May 18, 2026 at 12:21 pm

    If you searched for a month and you haven’t find anything that must be some kind of miracle
    searched 2 seconds find plenty of results

    http://www.ajaxdaddy.com/demo-jquery-autocomplete.html

    http://www.exploremyblog.com/html/blog_contents.php?blogid=300

    http://www.thewhyandthehow.com/jquery-autocomplete/

    there are millions of them
    for your code i would do something like this

      $(document).ready(function(){
        $("#example").autocomplete("./search.php");
      });
    

    try it

    $nameser = $_GET['q'];
    
    $names = '';
    
    $result = mysql_query("SELECT name FROM characters WHERE name LIKE '%".$nameser."%'");
    
    while ($row = mysql_fetch_array($result)) { $names .= $row[name]."\n"; }
    
    echo $names;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched around, and it seems that this is a limitation in MS
I've have searched on this and it seems to be a catch all, unfortunately
I've searched for this a little but I have not gotten a particularly straight
I have searched but apparently my google foo is weak. What I need is
How can I find the parameters of an undocumented Dll function? I have searched
I have done some searches looking for information about how to do logging with
I have a script that appends some rows to a table. One of the
I have found this example on StackOverflow: var people = new List<Person> { new
i have a input tag which is non editable, but some times i need
I have a form that searches all rows in a single table (TServices) that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.