To insert the full URL of a current page (this is for a shopping cart "return URL"), I was using this:
<? echo "$SERVER_NAME$PHP_SELF" ?>
This worked fine on my old hosting server (PHP Version 4.1.2). Then I changed my hosting server (PHP Version 4.3.11) and suddenly it wouldn't work. But now I find this works:
<? echo 'http://www.'.$HTTP_SERVER_VARS["SERVER_NAME"].$PHP_SELF.$_SERVER['REQUEST_URI']; ?>
As a PHP newbie I suspect both are suspect.. Is there a way of doing this that I should get into the habit of using?
.