Chapter 10. Processing Data from Forms

Process Information from a Form

The <form> tag specifies, with the action attribute, which script to run when the form is submitted. When the user clicks the submit button, the specified program runs and receives the information from the form. The form data is available in the processing program in built-in PHP arrays. The program can use the array elements in PHP statements. The program can display the form information, use the information in conditional statements, store the information in a database, or use the information in any manner.

The Superglobal Arrays

PHP provides three built-in arrays, called superglobal arrays, that contain the information submitted in a form: $_POST, $_GET, and $_REQUEST. $_POST ...

Get PHP & MySQL®: Your visual blueprint™ for creating dynamic, database-driven Web sites 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.