Is there any way by which I can attach the back button of my browser to any particular link?
Actually I am designing a login page in PHP. After login I want the back button of my browser to open any particular page that I want, how can I do that in PHP?
Actually I am not a PHP guy, so my question might sound silly to some. 😛
I suspect you want to redirect the user to a particular page after he logs in, you can simply use the
headerfunction for that:That will redirect home to
user-panel.phppage.The browser’s back button goes back until there is history found, just to add that you can use javascript for that although this might not be required in your case:
More info here
Update Based On Comment:
Basically you set a session when the user is authenticated for the first time, here is an example: