Re: register_globals

From: Date: Tue, 28 Jan 2003 22:13:58 +0000
Subject: Re: register_globals
Groups: php.general 
Request: Send a blank email to php-general+get-133445@lists.php.net to get a copy of this message
Depending on whether you're using GET or POST, try If($_GET['id'] == 1) or if($_POST['id'] == 1) Check out http://www.php.net/manual/en/print/reserved.variables.php "Kiswa" <Kiswa@telia.com> To: php-general@lists.php.net cc: 01/28/2003 02:41 Subject: [PHP] register_globals PM I know its stupid but i´ve been writing a site for a register_globals = on enviroment now i need to convert all the code to an off setting the page is built by sending a whole lot off vars to diferent pages. as you can see below the hyperlink sends the id var to the same page and then echos the code. can anyone help humpty dumpty? <font size="2"><a href="left.php?id=1" target="_self">Finansiering</a><BR> <? If($id==1){ echo "<a href=info/leas.htm target=\"mainFrame\"><font color=\"#00CCCC\">Leasing</font></a><BR> <a href=info/avb.htm target=\"mainFrame\"><font color=\"#00CCCC\">Räntefri avbet.</font></a><BR> <a href=info/stul.htm target=\"mainFrame\"><font color=\"#00CCCC\">Studentlån</font></a><BR>"; }; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#133445) next »