Page 1 of 1

need syntax for $string=true or $string=false

Posted: Thu Jul 29, 2004 5:48 pm
by jimbrown22
i made a private message system and now im adding the safeguards for it but i cant remember the = true part or = false
heres my code

the code is working fine but i want to add this check to tell if they are sending to a non-existent user

Code: Select all

if ($result=true){
echo "Your Message Has Been Sent.  You can view your pms " . '<a href="viewpms.php">Here</a>'; 
die;
}
if ($result=false){
echo "No user by that name exists";
die;
}

Posted: Thu Jul 29, 2004 6:53 pm
by feyd
== not =

Posted: Fri Jul 30, 2004 3:16 am
by lolpix
A = B // A is now equal to B
A == B // A and B are equal.
A === B // A and B are equal and of the same type, i.e., TRUE is TRUE and 1 is one 1, but 1 is NOT TRUE.