In this lesson, we’ll be using PHP to handle user input submitted through HTML forms. We’ll be performing form validations on the submitted data in order to protect our website and its users.
The back-end should never trust the data it receives from the client. Either intentionally or not, bad data from the client has the potential to expose sensitive information, corrupt our data, or significantly slow down our server. In this lesson, we’ll be working with forms with no front-end validations in place; this will simulate the untrustworthy nature of client-side validation.
We’ll be using PHP to handle the logic to receive POST requests, validate the data, store the data in the back-end, and display meaningful feedback to the user.