Chapter 4Forms

Forms are a vital part of any web application; they're commonly used as a way for visitors to provide information to websites. If you've done any type of HTML or web development, the chances are you've spent at least a little time with forms—perhaps connecting them to a third-party system for validation or processing. PHP can work with very complex forms to enable users to submit data to be validated and processed by your application.

In this chapter we're going to look at the various ways PHP can collect the data submitted from a form, and discuss how to validate it, preparing it for entry into our MySQL database. Later on, we'll carry on building our blog platform and will add a working admin panel.

Form Elements

To start with, ...

Get Jump Start PHP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.