PHP FormsLesson 26Free preview
PHP Form Validation
This lesson is part of PHP · All levels
Summary
Form validation ensures that the data submitted by the user is complete and compliant with the rules before it is processed. Validation should be done on the server side with PHP so it can't be manipulated, although it can be assisted with HTML5/JavaScript. This lesson discusses checking blank fields, formatting data, and delivering error messages.
Key points
- Validation ensures data must be available and in a format
- Validation on the server is safer than just relying on JavaScript
- Use empty() or isset() to check the data sent
- Display clear error messages and do not process invalid data
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.