Forms

In PHP, forms are easy to create, and PHP arrays help you add long lists to forms. PHP's easy presentation of variables from cookies, URL queries, and GET and POST based forms means you can quickly move to multiple-page forms and specialised form features, such as file uploads. The form's controls can also be used for things not associated with traditional forms, such as the alternative navigation mentioned in the next section. You can also use form submit buttons as an alternative to images and links for navigation.

The chapter on Forms contains the following sections:
   In Depth
      Alternative Navigation
      HTML or Pure PHP?
      Minimum HTML
      Bells and Whistles
         Form Questions
      Multiple Actions
      JavaScript
         Removing Fancy Drop-Down Menus
         Validating Fields at the Server
      Long Forms
         Breaking Up Long Forms
         Carrying Information from Page to Page
         Designing Good Long Forms
      Uploading Files
   Immediate Solutions
      Creating a Form
      Creating a Form using Functions
      Creating a Long List in a Form
      Aligning Columns
      Selecting One of Many Choices
      Selecting One of Many Choices with Radio Buttons
      Selecting Several of Many Choices
      Retaining Answers and Highlighting Errors

Printing a Form

Thank you to M. A. of Yugoslavia for an interesting question on printing forms. Read the new Immediate Solution about Printing a Form in the following list.

Updates and Additions

Updated and additional sections are in the following list.