Chapter 9. BUILDING ONLINE FORMS AND VALIDATING INPUT

Online forms are the gateway to the server, and lie at the very heart of working with PHP, the focus of most of the remaining chapters. You use forms for logging into restricted pages, registering new users, placing orders with online stores, entering and updating information in a database, and sending feedback by email. But gateways need protection.

You need to filter out incomplete or wrong information: a form isn't much use if users forget to fill in required fields or enter an impossible phone number. It's also important to make sure that user input doesn't corrupt your database or turn your website into a spam relay. That's what input validation is all about—checking that user input is ...

Get The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP 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.