Live Search with Ajax

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
15,656
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 22, 2009

Live search a mysql database with Mysql, php, jquery, ajax, javascript, html. Sound complicated? Its not.

All you have to do is create a keyup listener on a text box and just make sql calls using ajax to grab the data.

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (optikalefxx)

  • it doesnt work i havent got code wrong either

  • @SuperRorylewis it does work, seen in the video. Your welcome to send me what you have and I can help.

  • to show No results when text box is empty instead of all results simply

    surround you PHP file code with

    if($_POST['partialState']){

    //all php code here

    }

  • @russellsolid you could also detect it in JS and not send to php, then just clear the div

  • @optikalefxx how to remove the results when the textbox has no laters?

  • @MrCotcac so on keyup detect when the value is equal to blank. If it is, then delete the contents of your results box. If its not blank, then fill with results.

see all

All Comments (104)

Sign In or Sign Up now to post a comment!
  • ...found the error now and it works fine. I had a syntax mistake in the php file. $POST instead of $_POST.

  • sir I use jquery I did a live search but if I write letters very fast it says "Checking connection" and after that it includes ajax loading pape How can I fix it ???

  • @optikalefxx yh.... but im no good with JS lol hvnt learned it :p

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more