Re: Capture the whole URL

From: Date: Fri, 23 Feb 2007 20:41:29 +0000
Subject: Re: Capture the whole URL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-249320@lists.php.net to get a copy of this message
On Thu, February 22, 2007 4:26 pm, Ken Kixmoeller -- reply to ken@kixmoeller.com wrote: > Hey - - > > I must be missing something, but in a URL such as: > > diddly.com?id=fred&total=goof > > $_SERVER['PHP-SELF'] gives me the diddley.com part. > > I want to capture the whole URL. The documentation makes it seem like > $_SERVER['REQUEST_URI'] is supposed to do that, but I get an > "Undefined Index" error. > > Do I have to enable this somehow? I realize that I could recreate the > rest of the URL from $_GET's, but I'd rather not if I don't have to. Anytime you need to know what's available to you from PHP variables and settings, throw a <?php phpinfo();?> into the page, and surf to it again. Then search for the answer you want, and see what variable holds it. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#249320) next »