PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

WoorkUp.com: How-To Create Your Own Instant Search

Note: This article was originally published at PHPDeveloper on 16 September 2010.
PHPDeveloper

On the WoorkUp.com blog today Luiz Eduardo has posted a new tutorial about how you can create and add a "Google Instant" type of search to your site. The technique uses a combination of an HTML and Javascript frontend (jQuery) and a PHP backend.

This technology is not available for every webmaster in your own page yet, however, we can get really good results with php and jQuery, allowing everyone to create your own version of instant search. We are going to create now the simplest code, in order to learn how it works. This way anyone may learn easily and recreate it, fitting it perfectly with your own project.

He includes all of the code you'll need - the HTML frontend form for searching, the javascript to run the search each time a new letter is added or removed, the PHP to pull the results out of a database and even some CSS to help you correctly style the results box to the right place.