[thelist] php: difference between post vars?

Dougal Campbell dougal at gunters.org
Thu Aug 7 13:36:00 CDT 2003


On Thu, 7 Aug 2003, Ned Baldessin wrote:

> > It's still better to write your code to use $_GET and
> > $_POST
>
> Am I the only one to usually use $_REQUEST in stead of $_GET or $_POST ?
>
> I tend to do it do be on the safe side, in the case some template
> designer decides to change the method of a form, etc.
>
> Is there any performance issue with using $_REQUEST ?

I doubt there's any performance difference. The only thing you *might*
need to be concerned about with $_REQUEST is that depending on your GPC
options, someone might be able to override POST variables from a form by
supplying GET parameters in the URL querystring (or vice versa, as the
case may be). But as long as you're doing good sanity/security checking
on your request input, that shouldn't be a problem.

-- 
Ernest MacDougal Campbell III, MCP+I, MCSE <dougal at gunters.org>
http://dougal.gunters.org/             http://spam.gunters.org/
  Web Design & Development:  http://www.mentalcollective.com/
       This message is guaranteed to be 100% eror frea!


More information about the thelist mailing list