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?

Not faster.

Maybe cleaner, if you only want to allow $_POST, or $_GET as appropriate.

$_REQUEST also contains all of $_COOKIES as well.

I use $_REQUEST when I *want* the script to respond to $_GET / $_POST
because I expect other folks will find it useful as either a link or FORM
from their own sites.

Guess I'm breaking some rules about the GET only retrieves though, in some
places, maybe...

Though, really, GET logs all kinds of stuff, and maybe you are
user-tracking and whatnot, plus session time-stamping all "changes" stuff,
so where does one draw the line?

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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