Newbie question...login system



Hi all,

I am trying to create a login system for my site. I've got everything
working properly so far, but I would like to make it a bit cleaner.

Currently, on each page that requires the user to be logged in, I am
checking the session first and redirecting them to the login page if
they are not logged in...else, I display the page contents.

Is there a way that I can, somehow, create some sort of function that
will check a 'config' file to see if the page requires the user to be
logged in? For instance, I'd like to be able to put one call in my
header file that checks to see if the current url requires a login.
What I'm trying to avoid, is having to put the login check in each
specific page.

Also, I would like to save the referring url so I can redirect them
back to where they were trying to go in the first place.

Hope this makes sense...

Thanks in advance for any suggestions,
Stacey

.



Relevant Pages

  • Re: Newbie question...login system
    ... I am trying to create a login system for my site. ... header file that checks to see if the current url requires a login. ... I would like to save the referring url so I can redirect them ...
    (comp.lang.php)
  • Re: Newbie question...login system
    ... checking the session first and redirecting them to the login page if ... header file that checks to see if the current url requires a login. ...
    (comp.lang.php)
  • Re: Authentication login screen appears on both frames of the framset
    ... wouldn't be redirecting to the login. ... give all users permission to the page that shouldn't redirect, ... >> If you're using forms authentication when a user is not authorized to see ... >> page they are automatically redirected to the login page. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RedirectFromLoginPage problem, not redirecting to members page
    ... I am having problem with redirecting the user form the login page to members ... page using RedirectFromLoginPage method. ... add new folder and name it as 'members'. ...
    (microsoft.public.dotnet.security)
  • Re: Login security for a form
    ... If its redirecting to the login page it sounds like either the cookie ... login.aspx to authenticate me. ...
    (microsoft.public.dotnet.framework.aspnet)