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" <[EMAIL PROTECTED]>
> Date: Wed, 10 Jul 2002 22:40:48 +0200
> To: [EMAIL PROTECTED]
> 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
> 
> 
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to