Jump to content

[SOLVED] Else Not Posting Properly


Hartley

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.