/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<ul id="access"> <li><?php global $user; if($user->uid>0){ //logged in echo "<span>Welcome! $user->name </span>" .l("My Account",'user') .'</li>'; } else { echo l('Sign up','user/register') .'</li>'; echo '<li>' .l('Login','user') .'</li>'; } ?> </ul>