In the example URL : http://www.yourdomain.com/index.php?ID=4 I want to be able to extract the whole URL and not just everything minus the GET variable. When I use $_SERVER['PHP_SELF'] all I get is http://www.yourdomain.com/index.php Is there a $_SERVER variable which retains the rest of the data?
$_SERVER['REQUEST_URI'] is the closest thing I know of off the top of my head (includes everything except the host). You could use $_SERVER['HTTP_HOST'] for that if you want.
execute a file called. http://www.yourdomain.com/phpinfo.php in this file place the statement <? phpinfo(); ?> Code (markup): Try $REQUEST_URI and add the path to it