<!--this php code goes in the page.tpl.php or in a block with php filter -->
<?php global $user; if (!$user->uid) {
print "<a href='http://".$base_path."/user' >login</a>"; }
else {
print "<a href='http:// ".$base_path."/user/logout' >logout</a>";
} ?>Sorry, I had the wrong php code here, the above code is correct, I tested it on my site.
-edit- Redid the code to include the sitename, no need to change anything now. :)
Thanks, just what I was looking for!
ReplyDelete