Jump to content

Recommended Posts

I have a function that verifies membership status, and thus I have it defining variables.

 

if (!$usergroupid || $usergroupid == "5" || $usergroupid == "6") {

$adminapp = "1";
$memberverify = "1";
$footer = "<b>Site Admin:</b> <a href=\"index.php?p=appmanager\">Application Manager</a> - <a href=\"index.php?p=recruit-edit\">Recruitment Updates</a>";

}

elseif (!$usergroupid || $usergroupid == "7" || $usergroupid == "9") {

$memberverify = "1";
$adminapp = "0";
$footer = "";

}

else {

$adminapp = "0";
$footer = "";
$memberverify = "0";

}

 

However, if they didn't fall in the previous categories, shouldn't they fall under the else? When I run this function, it ignores the else altogether. =(

Link to comment
https://forums.phpfreaks.com/topic/58796-solved-else-not-posting-properly/
Share on other sites

Trying to see a way to post this for you to see. The code around it doesn't relate to this. The only bit related is the following that precedes:

 

$pminbox = "SELECT pmtotal, pmunread, userid, usergroupid, username, salt, lastvisit FROM user WHERE userid = " .$_COOKIE['bbuserid'];
$pmquery = mysql_query($pminbox);

while($pmstatus = mysql_fetch_assoc($pmquery))
{
   $unread = "{$pmstatus['pmunread']}";
   $total = "{$pmstatus['pmtotal']}";
   $userid = "{$pmstatus['userid']}";
   $username = "{$pmstatus['username']}";
   $salt = "{$pmstatus['salt']}";
   $lastvisit = "{$pmstatus['lastvisit']}";
   $usergroupid = "{$pmstatus['usergroupid']}";
}

 

This gets the user's various forum information (I use the forum groups to determine permissions, thus, that's the usergroupid). What more would you need to help find the problem? Thanks again!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.