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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jimbrown22
Forum Newbie
Posts: 1
Joined: Thu Jul 29, 2004 5:48 pm

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

Post 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;
}
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

== not =
lolpix
Forum Commoner
Posts: 41
Joined: Sat Jul 17, 2004 2:20 am

Post 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.
Post Reply