Re: variables

From: Date: Sat, 03 Aug 2002 04:55:00 +0000
Subject: Re: variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-110931@lists.php.net to get a copy of this message
On Sat, 3 Aug 2002 12:19:15 +0800, Jason Wong wrote: >On Saturday 03 August 2002 10:43, Bob Lockie wrote: >> What is the difference from using $_GET['some_var'] from using >> $_REQUEST['some_var']? I think the documentation says either can be used to >> do the same thing. > >$_REQUEST holds everything from $_GET, $_POST, and $_COOKIE combined, thus you >cannot differentiate where the value came from. > >If you want to be sure, be specific and use one of $_GET/$_POST/$_COOKIE. There is no reason other than knowing where it came from to choose one method over the other? For *most* applications it would seem that using REQUEST is better planning.

« previous php.general (#110931) next »