The prefered 'login' procedure and redirect.
From: Simon (spambucket_at_myoddweb.com)
Date: 03/24/05
- Next message: worzel: "Re: config PHP and tomat"
- Previous message: Ryan Heuser: "Re: Image function puzzle"
- Next in thread: Geoff Berrow: "Re: The prefered 'login' procedure and redirect."
- Reply: Geoff Berrow: "Re: The prefered 'login' procedure and redirect."
- Reply: Kenneth Downs: "Re: The prefered 'login' procedure and redirect."
- Reply: Andy Hassall: "Re: The prefered 'login' procedure and redirect."
- Reply: Chung Leong: "Re: The prefered 'login' procedure and redirect."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Mar 2005 06:56:25 -0000
Hi,
I have a Login.php page that logs the user in and out.
I has two forms within the page, (depending on what we are trying to do),
either one to log in or out.
The form calls itself using a post method and either logs the user in our
out given the information from the form.
but every pages use sessions and cookies, if the user is successfully logged
in then the cookies and session values are updated, (as well as MySQL).
Now it all works fine but I want to add some functionality where if the user
goes to a restricted page they are sent to the login page, and if the login
is successful then they will be sent back to the original restricted page.
I can redirect the user from the restricted page to the login page, but
returning to the restricted page after login is a problem as the headers
have been sent already, (to do the login).
Because the login uses sessions/cookies and tables I have to send the
headers to do the login as I cannot login the user and then redirect them to
a page, (the redirect must be before sessions/cookies I believe.
So what is the 'preferred way to redirect users after a successful login?
Simon
- Next message: worzel: "Re: config PHP and tomat"
- Previous message: Ryan Heuser: "Re: Image function puzzle"
- Next in thread: Geoff Berrow: "Re: The prefered 'login' procedure and redirect."
- Reply: Geoff Berrow: "Re: The prefered 'login' procedure and redirect."
- Reply: Kenneth Downs: "Re: The prefered 'login' procedure and redirect."
- Reply: Andy Hassall: "Re: The prefered 'login' procedure and redirect."
- Reply: Chung Leong: "Re: The prefered 'login' procedure and redirect."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|