note 45257 deleted from reserved.variables by aidan
| From: | aidan@php.net | Date: | Mon, 13 Sep 2004 07:36:52 +0000 |
| Subject: | note 45257 deleted from reserved.variables by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76583@lists.php.net to get a copy of this message | ||
Note Submitter: Dave Zyga
----
An easy way to gather all $_POST variables for form processing:
$post = array();
$post = $_POST;
foreach($post as $key => $value)
$$key = $value;
This assigns all variables from the form the values they pass.
For example, if a form contains
<input type='text' name='fname'>
<input type='text' name='lname'>
The submit page will have variables $fname and $lname, each containing the values the user entered
in these two textboxes.
Just a nice shortcut when processing large forms.