IN THIS CHAPTER
POST versus GET
Variables and values
Form controls, including text entry fields, buttons, menus, and hidden data
A word about form layout
It’s hard to go on the Web without encountering some sort of form, whether you’re making a purchase, signing up for a mailing list, or requesting product information. Although forms have a wide range of uses, from simple search boxes to complex online shopping interfaces, they are all built out of the same components.
This chapter introduces web forms, how they work, and the markup used to create them.
There are two parts to a working form. The first part is the form that you see on the page itself. Forms are made up of buttons, text fields, and pull-down menus (collectively known as form controls) used to collect information from the user. Forms may also contain text and other elements.
The other component of a web form is an application or script on the server that processes the information collected by the form and returns an appropriate response. It’s what makes the form work. In other words, putting up an (X)HTML page with form elements isn’t enough. Web applications and scripts require progamming know-how that is beyond the scope of this book, however, the Getting Your Forms to Work sidebar later in this chapter provides some options for getting the scripts you need.
If you are going to be creating web ...