Page 1 of 1

[56K WARN] Need help with login session logic

Posted: Mon Mar 19, 2007 2:10 am
by parka
Thanks in advance.

I'm using sessions to pass the error (if there is any) around.

There's this login bar on every page for my website. I've coded it to show an error if the username/password do not match or if the user doesn't exist in the database.

Let's say on the index.php page (top left figure below), I entered nothing and hit enter, it will show the error below (top right figure below).

If I go to some_other_page.php, that error is still visible under the login bar. How can I reset the error for the next page? I know I have some session logic error but I can't figure out what.

Image

Posted: Mon Mar 19, 2007 2:56 am
by mikeq
Whatever the session variable is that passes the error around set it to '' or unset it.