Login / Logout links.... Plz help!

PHTech

Senior Member
Joined
Aug 21, 2006
Messages
588
Hi there...

I'm wondering if someone can help me with the following issue that I have...

I have seen on websites that the "Login" link changes to a "logout" link once you have logged in...

So, now I want to know how can I create the exact same thing on my website(s).

Im using:
--> Dreamweaver CS3
--> WAMP5 2.0
--> PHP, MySQL.

PLEASE can someone please tell me with easy steps how to do it...!

Thanx in advance...!
 

.Froot.

Executive Member
Joined
Aug 6, 2007
Messages
9,261
It's really not hard. Are you using the developer's toolbox? I use that to do my login/logout buttons. Pretty much you have the following: ifloggedin(<login-link>)else(<logout-link>).

There is a "check if user is logged in" in the section on your right (I am not at my development pc right now). If that is true, then check it to show the logout link. else, show the login link.
 

Nod

Honorary Master
Joined
Jul 22, 2005
Messages
10,059
When the person logs in, set a variable to indicate that (cookies will also work). At the place where you need to put the link, use an "if" statement to read the variable, or cookie, then provide either the login or logout option.
 
Top