[ Team LiB ] Previous Section Next Section

Hour 10. Working with Forms

What You'll Learn in This Hour:

  • How to get and use server variables

  • How to access information from form fields

  • How to work with form elements that allow multiple selections

  • How to create a single document that contains both an HTML form and the PHP code that handles its submission

  • How to save state with hidden fields

  • How to redirect the user to a new page

  • How to build HTML forms that upload files and how to write the PHP code to handle them

Until now, all the examples in this book have been missing a crucial dimension. You can set variables and arrays, create and call functions, and work with objects. All this work is meaningless if users can't reach into a language's environment to offer it information. In this hour, you will look at strategies for acquiring and working with user input.

On the World Wide Web, HTML forms are the principle means by which substantial amounts of information can pass from the user to the server. PHP is designed to acquire and work with information submitted via HTML forms.

    [ Team LiB ] Previous Section Next Section