Skip to main content
Participant
September 4, 2006
Question

dynamic login [help]

  • September 4, 2006
  • 1 reply
  • 182 views
hi everyone!

I'm using dw8+php and i can do a working login/logout/userdetails page...

My question is this:

how can i make disapear the login form and display the username and the signout link, after a successful login? I could use an alternative page, but i want the login information displayed in all pages of my portal....

Thank's
This topic has been closed for replies.

1 reply

September 4, 2006
if you are using a session to track the user try this:

<?php
if(!isset($_SESSION)){session_start();}
//set username to what ever you save the user as
if(isset($_SESSION['username'])){
echo "Current User: ".$_SESSION['username'];
//put logout link here
}else{
//show the log in form
}
?>