Ok i've been using the variable $PHP_SELF from the current page url for my own purposes (gets sent to a login script and after they're logged in it'll redirect back to the url sent in the beginning). The problem is that if I use $PHPSELF, it only returns the single script name /directory/index.php and not /directory/index.php?selection=apple&page=view . Is there any other way I can easily get the page url without constructing it myself?