Jump to content

$_server['php_self'] Alternative?


son
 Share

Recommended Posts

I am working on a 'Continue shopping' link and have the following code:

$_SESSION['back'] = $_SERVER['PHP_SELF'];if (isset($_SESSION['back']) && $_SESSION['back'] != '')		{		$backlink = $_SESSION['back'];		}		else		{		$backlink = 'index.php';		}		echo "<a href=\"" . $backlink . "\" title=\"Continue Shopping\"><INPUT type=\"submit\" value=\"Continue Shopping\" id=\"continue\" name=\"continue\"></a> ";

It works for pages that do not contain any query string (item.php?pid=8&cid=10 for example), but for those with query string it does not. Is there an alternative to $_SERVER['PHP_SELF'] which includes querystring?SonSon

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...