This chapter extends our discussion of validation in PHP. We have already introduced basic security validation and empty field checks in Chapter 6. We continue here by introducing the principles of validation and the practice of validating form variables and values with PHP. We show you how to validate strings, numbers, dates, times, and Internet addresses, and how some of these tasks can be simplified using PEAR packages.
This chapter is about user data and helping users to meet system requirements. Parse errors, database server failures, debugging code, and other PHP and database server problems are the subject of Chapter 12.