Prev | Current Page 429 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

php';
364 CHAPTER 13 ?–  FORMS
// Create the array used for auto-completion
$teams = array('Steelers', 'Seahawks', 'Steel Curtains');
// Instantiate the HTML_QuickForm class
$form = new HTML_QuickForm();
// Create the autocomplete element
$element =& $form->addElement('autocomplete', 'teams',
'Favorite Football Team:');
// Map the array to the autocomplete field
$element->setOptions($teams);
// Display the form
$form->display();
?>
Summary
One of the Web??™s great strengths is the ease with which it enables us to not only
disseminate but also compile and aggregate user information. However, as developers,
this means that we must spend an enormous amount of time building and maintaining
a multitude of user interfaces, many of which are complex HTML forms. The concepts
described in this chapter should enable you to decrease that time a tad.
In addition, this chapter offered a few commonplace strategies for improving your
application??™s general user experience. Although not an exhaustive list, perhaps the
material presented in this chapter will act as a springboard for you to conduct further
experimentation as well as help you decrease the time that you invest in what is surely
one of the more time-consuming aspects of Web development: improving the user
experience.
The next chapter shows you how to protect the sensitive areas of your Web site by
forcing users to supply a username and password prior to entry.


Pages:
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441