I have a problem with a login script.
I want each page that requires authentication to send user to the login page, if not already logged in.
Once authenticated, user should then be returned to the page he was trying to access.
The last step above is what I'm having trouble with.
- user arrives at index.php
if(!isset(HTTP_COOKIE_VARS["logged"]))
...
send user to login page
...
- After verification of login/passwd, return user to index.php
Apache's HTTP_REFERER does not work, since user did not click on a link to get to the login page.
Also, php's $REQUEST_URI didn't work, since the login process spans two pages. The second login page should return user to index.php, but it returns user to the first page instead.
Anybody got some help for me on this one?
Richie.