henryhenry Posted April 24, 2007 Share Posted April 24, 2007 For example, a user needs to register before accessing a part of the site. The registration takes the user to another page. After finishing the user is left on the homepage and not where s/he clicked 'register'.I can think of a few possible solutions to allow the user to return automatically to the original page. Are there any standard methods out there that are tried an tested? I was thinking of storing a session variable ... something like:$_SESSION['return_point']= $_SERVER['PHP_SELF'];When it's set a return point is available so that after the registration script, it can check if it's set and send the user there.I could use the database but that would seem a bit exhaustive.Anyone have a favourite method?Thanks!!! :)Henry Link to comment Share on other sites More sharing options...
jesh Posted April 24, 2007 Share Posted April 24, 2007 I typically look at the referrer. If someone is on page5.php and clicks on your register button to load register.php, I would check on the register.php page what the referrer was and store that either in the URL (register.php?page=page5.php) or in a Session. Then, when the registration is complete, redirect the user to that page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.