Guest jeromas Posted September 4, 2005 Share Posted September 4, 2005 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. Quote Link to comment Share on other sites More sharing options...
convict Posted September 4, 2005 Share Posted September 4, 2005 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&redir={VAL_SELF}" class="txtSession">{LANG_LOGIN}</a> Quote Link to comment Share on other sites More sharing options...
Guest jeromas Posted September 5, 2005 Share Posted September 5, 2005 Thank you very much -- that did the trick! :w00t: Quote Link to comment Share on other sites More sharing options...
convict Posted September 6, 2005 Share Posted September 6, 2005 Gladly :mellow: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.