Hello. I am working on a project, some section only allowed registered user to access. If the uses are not log in when they try to access those section, they will send to login page. What I am think to do is do a include file which will check for session and cookie to determine the user, and redirect the use to login page if both information is not present. However, I need to put the original request url into session valuable, so after the user login, they will get the same page. How could I refer to the url which include that test file?? Thanks. Did I explain it clearly?
I too have a similar need -- I need to add a link to a page, (normally accessible after a login) in a mail and the user should be able to access the page if he is currently logged in. Else he should first be directed to the login screen and upon successful login, should be lead to the concerned page. How can this be achieved?