Welcome! Log In Create A New Profile


Re: [PHP] Setcookie()

Posted by Bastien Koert 
Bastien Koert
Re: [PHP] Setcookie()
October 12, 2008 04:05PM
On Sat, Oct 11, 2008 at 12:33 PM, Per Jessen <[email protected]> wrote:

> Ben Stones wrote:
> > What I mean is I cannot use setcookie, I need to check if user
> > credentials are correct first (which is BEFORE setcookie) and if so,
> > set a cookie. I can't do that unless setcookie is first, but I need to
> > check if the user credentials is correct. Furthermore I cannot use
> > setcookie in the header as I want to display a message saying that
> > they have successfully logged in in the correct area of my template.
> Well, I'm doing exactly that and it works just fine. This is a rough
> outline of the flow:
> GET <login page> (form with user and password fields)
> POST <login page>
> validate user+password, save in session
> setcookie().
> redirect with 303 to <welcome page>
> GET <welcome page>
> /Per Jessen, Z
Sorry, only registered users may post in this forum.

Click here to login