Return to page that user just left
Posted 14 March 2006 - 04:45 PM
Posted 14 March 2006 - 04:54 PM
When a user click 'logout' i want it to run a script that clears the session but also in that script i want it to bring them back to the page they clicked the link on, how can I do this in php?
<?php //in a very simple way session_start(); session_destroy(); header("location: //page they just came from"); ?>
Posted 14 March 2006 - 04:57 PM
Posted 14 March 2006 - 05:53 PM
So if you clicked a link in a page called page1.php in mydomain.com/folder1/page1.php then it should return mydomain.com/folder1/page1.php
However this variable can be spoofed and some browsers may not send this type of information over.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users