note 47205 deleted from security.globals by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 05 Nov 2004 21:19:23 +0000 |
| Subject: | note 47205 deleted from security.globals by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80181@lists.php.net to get a copy of this message | ||
Note Submitter: rushenas at hotmail dot com
----
If you don't access to your PHP confoguration file (e.g. you are using a hosting services),
your server may set the register globals to off. In this case, you still can use the short form of
variables, by placing this code on the top of your page:
<?php
# This would be useful for POST method
foreach ($_POST as $key=>$value)
{
$$key = $value;
}
?>
<?php
# This would be useful for GET method
foreach ($_GET as $key=>$value)
{
$$key = $value;
}
?>
Happy PHPing!
Amir Hosein Rushenas
----
Reason: useless example