micmania1 Posted July 17, 2007 Share Posted July 17, 2007 If a user is not logged in on my site and goes to a page which they need to be, they are redirected to the login page. When they login, they are redirected to the page they were pm. The preoblem is, if there are 2 $_GET values, it only reads the first. Example: http://www.mydomain.com/page.php?get=value&get2=value2 http://www.mydomain.com/login.php?redirect=http://www.mydomain.com/page.php?get=value $_GET['get2'] is not in the login.php url. I am using $_SERVER['REQUEST_URI'] Can anybody help? Quote Link to comment Share on other sites More sharing options...
richardw Posted July 17, 2007 Share Posted July 17, 2007 I believe the second "=" sign is your problem. Start with changing it so both values are recognized as one. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted July 17, 2007 Share Posted July 17, 2007 Why not use $_SERVER["REFERER"]? I think it contains the URI of the previously visited page. Quote Link to comment Share on other sites More sharing options...
micmania1 Posted July 18, 2007 Author Share Posted July 18, 2007 Why not use $_SERVER["REFERER"]? I think it contains the URI of the previously visited page. I remember trying something like this when I first made it but there was a problem. Can't remember what it was now but it works now anyway. Thanks for your help and sorry for being thick. 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.