The second and third pieces of code you have, what files are you placing these in? If you're placing it in the getlinks function in functions.php you might have to call the logincheck() function before using the code, such as this:
PHP Code:
$loginstatus = logincheck();
$isloggedin = $loginstatus[loginstatus];
$loggedinname = $loginstatus[username];
if($isloggedin == "yes"){
$royallinks = "
<li><a href='pages.php?page=royals'>My Royals</a>
<ul>
<li><a href='adopt.php'>Adopt a Royal</a></li>
<li><a href='myadopts.php'>Care for Royals</a></li>
<li><a href='promo.php'>Rare Royals</a></li>
</ul>
</li>
";
}
else{
$royallinks = "";
}
if($isloggedin == "yes"){
$accountlinks = "
<li><a href='account.php'>Account</a>
<ul>
<li><a href='profile.php?user=".$username."'>View Profile</a></li>
<li><a href='account.php?act=changeemail'>Change Email</a></li>
<li><a href='account.php?act=changepass'>Change Password</a></li>
<li><a href='forgotpass.php'>Reset Password</a></li>
<li><a href='account.php?act=changesettings'>Settings</a></li>
</ul>
</li>";
}
else{
$accountlinks = "";
}
if($isloggedin == "yes"){
$pmlinks ="
<li><a href='messages.php'>Inbox</a></li>
<li><a href='messages.php?act=send'>Compose Message</a></li>";
}
else{
$pmlinks ="";
}
See if that works. :)
Brandon