I have a a couple of password protected pages and if the user is not logged in and goes to one of these pages it displays the login form, my only problem is though the login page is set to take them to a page called main.php . I would like to know how to get it to redirect to the page they were just at.
Example:
If they had a page called example.php in their favorites and went to it when they were not logged in it would display the form.
They enter the username and password,
then goes to the page that proccess the login and then sends them back to example.php
I hope this makes since.
and another thing (its not nessesary) but if they went to the login page like they were supposed to login page then it would send them to main.php instead of the login page.)
I hope this makes since.