php get name of user loged in code example
Example: how to show login user name in php
<li class='active' style='float:right;'>
<?php
session_start();
if($_SESSION['logged']==true){
echo $_SESSION["username"];
echo '<a href="logout.php"><span>Logout</span></a></li>';
}
elseif($_SESSION['logged']==false)
echo '<a href="registerform.html"><span>Login/Register</span></a></li>';
?>