Reply to Re: [PHP] $_REQUEST or $_POST?

Your name:

Reply:


Posted by Richard Lynch on 01/18/05 19:38

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?

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация