RE: [PHP] Register Globals Query

From: Date: Tue, 29 Apr 2003 17:05:34 +0000
Subject: RE: [PHP] Register Globals Query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-145676@lists.php.net to get a copy of this message
Just put $variable=$_GET["variable"]; somewhere before you want to use it, then use $variable as you normally would. --- caspar kennerdale <caspar@thetuckshop.com> wrote: > "That is the appropriate method - you would use $_GET{"variable"]. > I'm > having trouble searching php.net right now, but is it possible that > "variable" is reserved?" > > > My problem here is that as I want to have > > admin.php?action=Test&variable=123 as a link. > > 'action' is my switch and is requested as $_GET("action") at the > top of the > switch, but I am unsure as where to place place the > $GET("variable") to make > the following code work. > > switch ($_GET['action']) { > default: > echo "<a > href=\"admin.php?action=Test&variable=yes\">test</a>"; > > break; > > case "Test": > echo $variable; > break; > > } > > Thanks > > > > ===== > Mark Weinstock > mark_weinstock@yahoo.com > *************************************** > You can't demand something as a "right" unless you are willing to > fight to > death to defend everyone else's right to the same thing. > *************************************** > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock mark_weinstock@yahoo.com *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com

« previous php.general (#145676) next »