Jump to content

Unable to make a value read as "true"?


CourtneyRae

Recommended Posts

I'm, unfortunately, asking the question on behalf of our coder, so I may not phrase it entirely correct (Apologies in advance!).

 

We are trying to use the following code to make a particular message display onscreen upon logging in. We think that the if statement is not functioning, or not reading the value as true. Any way to fix the problem?

 

if ($isloggingin == 1)
  {
       set("last_login",time());
set("flags",str_replace("(nodeltemp)","",get("flags")));
$action = "/".get("login");
  echo "<font color=".get("tcolor").">\n";
print (getfile("rpinfo"));
print nl2br(stripslashes(getfile("login")));
$pcs=explode(":",getfile("online"));
for($i=0;$i<count($pcs);$i++)
{
  if(strpos(getuser($pcs[$i],"friends"),$username)!==false&&!(getuser($pcs[$i],"x")==get("x")&&getuser($pcs[$i],"y")==get("y")&&getuser($pcs[$i],"z")==get("z")&&getuser($pcs[$i],"plane")==get("plane")))
  setuser($pcs[$i],"chat",getuser($pcs[$i],"chat")."<font class=friends><input type=button class=button onClick=javascript:tellTo('$username') value=*>$username has come online.</font><br>\n");
}
  }
 
Thanks for any help!
Link to comment
https://forums.phpfreaks.com/topic/282699-unable-to-make-a-value-read-as-true/
Share on other sites

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.