Forum Moderators: coopster

Message Too Old, No Replies

Switch login with logout?

         

anubis81

12:15 am on May 17, 2005 (gmt 0)

10+ Year Member



I know this is probably a stupid newbie question but that's what I am with PHP. I know how to do this in ASP but I don't know how to translate it to PHP. What I want to do is change the "Login" image to a "Logout" image when a user is logged in. Simple I know, but I just don't know enough PHP to do it. Thanks much.

David

ajs83

12:40 am on May 17, 2005 (gmt 0)

10+ Year Member



Just set up an if statement

if (!isset($_COOKIE[YOUR DEFINED VARIABLE])) {
echo"logoutimagetage";
} else {
echo"loginimagetage";
}