|
Posted by Chris Shiflett on 01/17/05 17:17
--- gustav@varupiraten.se wrote:
> I've learned to use $_REQUEST but it seems to me that it uses any
> $_GEt, or $_POST. Is it better to $_POST when I'm just using
> $_POST? It seems like that if I want "good code", but I mean is it
> faster with $_POST?
It's not faster, but it is a better practice. It is also particularly
helpful for avoiding certain types of common attacks, because it allows
(forces, actually) you to keep up with the exact origin of data.
This is also important in adhering to the HTTP specification which states
that GET requests should not perform any action other than retrieval.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security - O'Reilly HTTP Developer's Handbook - Sams
Coming Soon http://httphandbook.org/
Navigation:
[Reply to this message]
|