View Single Post
Old 05-11-2008   #1 (permalink)
Trueskool
Registered User
 
Join Date: May 2008
Posts: 3

Member Tutorial: Taking it further.

Hey,

I completed the membership tutorial and have it fully working on my website. There is one thing that I have always wanted but just couldn't find out how to do so that it would work properly. That is displaying a message in the navigation bar for users while logged in, but something different when not. For example:

Welcome Trueskool, Control Panel | Logout <-- When logged into the script

Welcome Guest! Please Login or Register <-- When not logged in


I was able to put this code together, which was showing the logged in message where ever I put the code, but I need to take if further and possibly do some sort of IF Statement, along with SESSION.

PHP Code:
<?php
echo "
<p>Welcome '.$_SESSION['s_username'].'! <a href="
http://example.com/member.php">Control Panel</a> | <a  href="http://example.com/logout.php">Logout</a></p>
";
?>
NOTE: I'm not a coder, I plan to start learning PHP properly within the next few months.

Any help would be awesome!

Thanks,

Last edited by Trueskool; 05-11-2008 at 01:47 PM.
Trueskool is offline   Reply With Quote