Re: $_REQUEST or $_POST?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- gustav@xxxxxxxxxxxxxx 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux