Exoon Posted January 11, 2008 Share Posted January 11, 2008 Hello, ive made a php login system but what i was it to do is once theyve loged in i would like it to go back to where they previously were. Im current using javascript to go back 1 page which works but it dosent refresh the page when they go back so its still showing the old page and not showing them as loged in, is there anything else i can do to let the user to back to the page they was on before logging in. Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/ Share on other sites More sharing options...
adam291086 Posted January 11, 2008 Share Posted January 11, 2008 you can use meta refresh, google it for the exact code Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/#findComment-436544 Share on other sites More sharing options...
Exoon Posted January 11, 2008 Author Share Posted January 11, 2008 How will that take them back to where they last were and refresh it? <meta http-equiv="refresh" content="5;javascript: history.go(-1)" /> Ive got that at the moment, it takes me back but dosent fresh the page once theyve been taken back Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/#findComment-436554 Share on other sites More sharing options...
revraz Posted January 11, 2008 Share Posted January 11, 2008 Use HTTP REFERRER to store where they come from, then you can go back there when you want as a new page and not as a BACK. Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/#findComment-436555 Share on other sites More sharing options...
The Little Guy Posted January 11, 2008 Share Posted January 11, 2008 [code] <?php header("Location: ".$_SEREVER['HTTP_REFERRER']); ?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/#findComment-436557 Share on other sites More sharing options...
Exoon Posted January 11, 2008 Author Share Posted January 11, 2008 Thanks, apart from the spelling that worked $_SERVER['HTTP_REFERER'] Quote Link to comment https://forums.phpfreaks.com/topic/85543-going-back-once-loged-in/#findComment-436604 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.