RE: [PHP-WIN] register_globals and php 4.2

From: Date: Thu, 09 May 2002 17:07:48 +0000
Subject: RE: [PHP-WIN] register_globals and php 4.2
Groups: php.windows 
Request: Send a blank email to php-windows+get-13653@lists.php.net to get a copy of this message
Replace all references of "$pagetype" with "$_GET['pagetype']" (without the doube-quotes, of course) or have the line "$pagetype = $_GET['pagetype']" at the beginning of your file. Repeat this same idea with your other variables and you should be okay. > -----Original Message----- > From: brother [mailto:brother@lunarstorm.se] > Sent: Thursday, May 09, 2002 5:11 AM > To: 'php-windows@lists.php.net' > Subject: [PHP-WIN] register_globals and php 4.2 > > > I'm trying to rewrite my code so it will be useful under PHP 4.2. > the links at my site are in this format > index.php?pagetype=newsarchive&id=15&read=1 this will make > php to look fpr > the file /newsarchive/data.php and use the $id var to get the correct > newsline from the databse, however, when the register_globals > is set to off > I can't use this and I cann't figre out how to do it, HELP! > > the index.php starts with the code: > if (!isset($pagetype)) { > $pagetype = "news"; > } > > so all links displays the news page and that's not my goal =) > > /brother > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.windows (#13653) next »