Jump to content

login or log out


Alidad

Recommended Posts

hi, i need help with php, let say that there is one tabs said 'login" and once logged in, change automatic text to "log out" in same tab!

 

AM

 

Do you know how to use sessions? You can make it simple like so:

if ($_SESSION['logged_in'] == "yes") { 
   echo "<b>Log Out</b>";
} else { 
  echo "<b>Log In</b>";
}

 

So when they're logged in, the text of the tab will be changed.

Link to comment
https://forums.phpfreaks.com/topic/186550-login-or-log-out/#findComment-985195
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.