Thread: Link questions
View Single Post
  #11  
Old 07-18-2009, 12:38 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 18,271
BMR777 is on a distinguished road
Default RE: Link questions

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
Reply With Quote