Re: Globals problem - $_REQUEST good solution?
| From: | CPT John W. Holmes | Date: | Mon, 12 Jan 2004 21:23:19 +0000 |
| Subject: | Re: Globals problem - $_REQUEST good solution? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174377@lists.php.net to get a copy of this message | ||
From: "Ryan A" <ryan@coinpass.com>
> After going through the manual trying to find an answer I came accross
> $_REQUEST, is this a good
> solution? because I have never used this before or is this as bad as
having
> globals on?
The only simularity it has to register_globals ON is that you don't know
what method provided the value. It could be POST, GET, or COOKIE.
But... if you're validating the data properly anyhow, it really shouldn't
matter where it's coming from. I use $_REQUEST for everything, that way I
can change the method of my forms if I need to without affecting my code (or
the user can).
---John Holmes...