Ajax autosuggest/autocomplete from database

Software Screenshot:
Ajax autosuggest/autocomplete from database
Software Details:
Version: 1.0
Upload Date: 5 Jun 15
Developer: roscripts.com
Distribution Type: Freeware
Downloads: 16

Rating: 2.0/5 (Total Votes: 1)

Since google introduced the autosuggest or autocomplete search form on their toolbar everyone started looking for this piece of code to put on their websites.

It's not new in the Ajax world but it's not seen as often as it should if you ask me. Why? It's hard to find good examples or examples that match everyone's needs.

An Ajax autosuggest script is supposed to help the visitor and present in real time (as they type) some possible results based on their entered words/characters. This is a great feature to enhance the user experience.

It's not hard to build an autocomplete search form. In fact, it's very easy. This application will use script.aculo.us which is a rich Javascript library for the Ajax effect, an index page that will hold the search form and a response page that will perform the search based on the $_POST parameter received from our index and display some possible matches/results/suggestions.

Since it's very easy to follow the demos and examples from the scriptaculous website we will focus more on the response page and the way that it will select the results and display them.

Using what's explained in the PHP search engine tutorial I managed to build a nice response page in order to display my suggestions using Ajax. The response page will check the post data, stem it (plurals to singulars etc.), clean it (for common words, too short words etc.) and perform an sql search do display the entries that might match your words.

Comments to Ajax autosuggest/autocomplete from database

Comments not found
Add Comment
Turn on images!