Re: Forms
| From: | Jason Wong | Date: | Tue, 01 Jul 2003 04:54:26 +0000 |
| Subject: | Re: Forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153513@lists.php.net to get a copy of this message | ||
On Tuesday 01 July 2003 06:51, Daevid Vincent wrote:
> Additionally, you could put this in a header file or the top of your page:
>
>
> reset ($_GET);
> while (list ($key, $val) = each ($_GET)) {
> //echo "$key => $val<br>\n";
> $$key = $val;
> }
>
> reset ($_POST);
> while (list ($key, $val) = each ($_POST)) {
> //echo "$key => $val<br>\n";
> $$key = $val;
> }
>
> reset ($_SESSION);
> while (list ($key, $val) = each ($_SESSION)) {
> //echo "$key => $val<br>\n";
> $$key = $val;
> }
>
> So you can leave register_globals = off and get mostly the same
> functionality (and security issues if you're worried about them too).
All that the above achieves is re-introduce the potential security problems of
having register_globals = on (!)
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
What passes for optimism is most often the effect of an intellectual error.
-- Raymond Aron, "The Opium of the Intellectuals"
*/