Login Redirect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Jiao

    Login Redirect

    Hi, all

    I have this login script that calls on itself to authenticate the username
    and the password. It redisplays the login page if there is an error. My
    question is how do I redirect it to a different page, when the user is
    authenticated (i.e. the address in the address box changes to a new name,
    for example, if the login page is called login.php, then I want to redirect
    the logged in user to home.php without any clicking from the user). I
    realize that there is a header function available, but I've heard that any
    information related to the current session is lost upon using this function.
    Is there any better way?


    cheers

    ==James==


  • Ian.H [dS]

    #2
    Re: Login Redirect

    On Sun, 17 Aug 2003 04:43:40 +1200 in
    <message-id:2bt%a.11852$ 9f7.1364003@new s02.tsnz.net>
    "James Jiao" <jamesjiao@para dise.net.nz> wrote:
    [color=blue]
    > I want to redirect
    > the logged in user to home.php without any clicking from the user). I
    > realize that there is a header function available, but I've heard
    > that any information related to the current session is lost upon
    > using this function. Is there any better way?[/color]


    Hmm, don't know where you heard that, but I've just implemented this
    exact same idea.

    What results did you get when you tried it?



    Regards,

    Ian

    --
    Ian.H [Design & Development]
    digiServ Network - Web solutions
    www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
    Programming, Web design, development & hosting.

    Comment

    • Paul

      #3
      Re: Login Redirect

      Same here. Just implemented the same thing using the same process. Where di
      you read that as it may explain a problem I am having (in the post above
      this one).


      "Ian.H [dS]" <ian@WINDOZEdig iserv.net> wrote in message
      news:2003081618 0933.2da509e1.i an@WINDOZEdigis erv.net...[color=blue]
      > On Sun, 17 Aug 2003 04:43:40 +1200 in
      > <message-id:2bt%a.11852$ 9f7.1364003@new s02.tsnz.net>
      > "James Jiao" <jamesjiao@para dise.net.nz> wrote:
      >[color=green]
      > > I want to redirect
      > > the logged in user to home.php without any clicking from the user). I
      > > realize that there is a header function available, but I've heard
      > > that any information related to the current session is lost upon
      > > using this function. Is there any better way?[/color]
      >
      >
      > Hmm, don't know where you heard that, but I've just implemented this
      > exact same idea.
      >
      > What results did you get when you tried it?
      >
      >
      >
      > Regards,
      >
      > Ian
      >
      > --
      > Ian.H [Design & Development]
      > digiServ Network - Web solutions
      > www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
      > Programming, Web design, development & hosting.[/color]


      Comment

      Working...