October 2002
Intermediate to advanced
368 pages
7h 12m
English
PHP automatically registers[1] any variables passed from a form into the $HTTP_GET_VARS or $HTTP_POST_VARS array. If the form is submitted with the post method, then any values in the form are assigned to the $HTTP_POST_VARS array. If the form is submitted using the get method (the default method if no method is specified), then the values of the form are assigned to the $HTTP_GET_VARS array.
[1] Your php.ini file is automatically enabled for this feature if you are using PHP 4.0.3 or greater. If it is not turned on, then you have to edit the line in php.ini for track_vars and set it to true.
For example, when the following form is submitted to a PHP script:
<form action=script.php method=post> <input ...
Read now
Unlock full access