O'Reilly logo

PHP Ajax Cookbook by R. Rajesh Jeba Anbiah, Roshan Bhattarai, Milan Sedliak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Autocomplete from a database

Most of the time, users are sick of filling up forms. However, from the website's point of view, user input is very important for data mining and better service. When the end user has the ability to fill up forms quickly, or fill up forms easily, it will help both end users and the website owners. Autocomplete is one such attempt to help end users. Overall, we have two types of Autocomplete designs:

  • Within the browser UI, by allowing the browser to remember certain form inputs
  • Within websites that employ the Autocomplete technique to quickly fill up forms

In this recipe, we'll see how to integrate the jQuery UI Autocomplete plugin in a PHP script.

Getting ready

We'll require the jQuery UI from http://jqueryui.com/ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required