Re: how to

From: Date: Fri, 23 May 2003 04:33:11 +0000
Subject: Re: how to
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148704@lists.php.net to get a copy of this message
on 23/05/03 5:25 PM, Marius (mariusrk@delfi.lt) wrote: > > $PHP_SELF - show only the file > how to get the whole url like > index.php?show=1&id=2 > <? $foo = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; ?> OR better: <? $_SERVER['PHP_SELF']; if($_SERVER['QUERY_STRING']) { $foo = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; } else { $foo = $_SERVER['PHP_SELF']; } ?> Justin

« previous php.general (#148704) next »