Chapter 11. Working with Forms

Until now, the PHP examples in this book have been missing a crucial dimension. Sure, you know the basics, can set variables and arrays, create and call functions, and work with strings. But that’s all meaningless if users can’t interact in a meaningful way with your website. HTML forms are the principal means by which substantial amounts of information pass from the user to the server, so this chapter moves into this dimension and looks at strategies for acquiring and working with user input.

In this chapter, you will learn

  • 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 ...

Get Sams Teach Yourself PHP, MySQL and Apache All in One, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.