Re: varible in url question

From: Date: Wed, 10 Jul 2002 21:50:59 +0000
Subject: Re: varible in url question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-106959@lists.php.net to get a copy of this message
It works fine on my system. If you have register globals off you'll need to do it this way: <?php $sort = (!$_GET[sort]) ? 'day' : $_GET[sort]; echo("sort:" . $sort); ?> Rick And many strokes though with a little axe hew down and fell the hardest-timbered oak. - Shakespeare > From: "sven vandamme" <sven.vandamme@pandora.be> > Date: Wed, 10 Jul 2002 22:40:48 +0200 > To: php-general@lists.php.net > Subject: [PHP] varible in url question > > on my page (lessen.php) > > i have a variable $sort > > if this varible is empty if enterd the page then it will be set on 'day' > > i have 3 links in the page > > lessen.php?sort=day > lessen.php?sort=game > lessen.php?sort=player > > so these links refure to the same page (itself) > on clicked it opens itself and should set the varible to day, game or player > but that doesn't happen. > can somebody help me please > > > see attachmend > > greetz @cid > > > >

« previous php.general (#106959) next »