Wednesday, April 13, 2011
I used this code to determined the name of the user that login in my page or if its a guest only.
<?php
if(isset($_SESSION['fname']))
{
echo '<font face="Tahoma" size="1" color="black"><B>Welcome, '.$_SESSION['fname'].' |</B></font> ';
echo'<font face="Tahoma" size="1" color="black"><a href="destroysession.php" ><B>Log out</B></a></font>';
}
else
{
echo'<font face="Tahoma" size="1" color="black"><B>Welcome, Guest</B></font>';
echo'<font face="Tahoma" size="1" color="black"> | <a href="reg.php"><B>Register</B></a></font>';
}
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment