Search suggest box


I’m not sure if this has been answered before but I’m looking to include a suggestion box for a search box. What I need is as follows;

The search: start to type a search keyword eg. fish
The result: as soon as the first letter is typed, f, a list of entries starting with f appears in a box under the search box. As more letters are typed the search is refined.

I have searched on Google and through these forums but as yet have not found a decent way of achieving this. The results would be held in a mysql database. Are there any tutorials or guides on how to achieve this?

Is Ajax the way to go? Never used it but seen mentions of it on other posts regarding other similar queries. As I type this I have just realised there is a prime example on this very page, the Tags box.


Hi Richard, the term you’re looking for is AutoComplete, and yes AJAX is normally required.

A quick search for AJAX + AutoComplete should do the trick. :wink:

Yes, Ajax is the way to go. Every time the user types a letter, a request is sent to the server and a list of suggestions will be returned.

cheers for the quick replies will take a good look into it