[56K WARN] Need help with login session logic

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
parka
Forum Commoner
Posts: 52
Joined: Mon Feb 26, 2007 6:48 am

[56K WARN] Need help with login session logic

Post 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
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

Whatever the session variable is that passes the error around set it to '' or unset it.
Post Reply