Jump to content

How do I get the value for $_GET['redir']?


Guest jeromas

Recommended Posts

Guest jeromas

I'm trying to figure out how the value for the superglobal $_GET['redir'] is generated, namely on the login/register links usually found at the top of the page, ie the link looks something like this:

http://www.gaminggraveyard.com/classic_gam...DtyZXZpZXc9eWVz

All I want to do is have a link for logging in/registering on my product view pages, and I've found that if I set up the links without having this redirect, it takes the user to the index page in the event they click register, or it takes them to the login page if they click login and fails login the first time they try it.

I've looked through all the pages I can think of to see how this $_GET variable is generated, but I can't seem to find it. Any help would be greatly appreciated.

Link to comment
Share on other sites

Here you are >>>

Current page (with any parameter) is MIME base64 encoded, then assigned to VAL_SELF template variable.

Box session code:

$box_content->assign("VAL_SELF",base64_encode(currentPage()));


currentPage()
function currentPage(){



	$currentPage = $_SERVER['PHP_SELF'];

	if (isset($_SERVER['QUERY_STRING'])) {

  $currentPage .= "?" . htmlentities($_SERVER['QUERY_STRING']);

	}

	return $currentPage;

}




Session template:


<a href="index.php?act=login&amp;redir={VAL_SELF}" class="txtSession">{LANG_LOGIN}</a>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...