jamesp0tter
Programmer
well, i'm stuck in a code for hours and just can't figure out what's wrong.. i have this:
and, guess what... the function returns "not set"
now, how is this possible ? 
oh, if i erase the if clause and just leave
the functions returns correctly, including the $MEMBRO var that accordingly to php's if clause isn't set.
i just don't see any logic in this.
any help appreciated, thanks :]
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english
Code:
<?
if ((!$_SESSION['membro']) || ( $_SESSION['membro'] == '0' )) { unset($MEMBRO); } else { $MEMBRO = $_SESSION['membro']; }
// now, i'm sure $MEMBRO is set because other scripts use this var and they work fine
// then i have this:
function bla () {
if (!$MEMBRO) { return 'not set'; } else {
return 'set to '.$MEMBRO; }
}
?>
and, guess what... the function returns "not set"
oh, if i erase the if clause and just leave
Code:
return 'set to '.$MEMBRO;
i just don't see any logic in this.
any help appreciated, thanks :]
jamesp0tter,
jamespotter@netcabo.pt
p.s.: sorry for my (sometimes) bad english