How do I do a:
if $this AND $that then Do That end if
With PHP?
Thanks guys... reallty stupid problem, but couldn't find any help in the manual.
Try that:
if($text=="male" or $text=="female") { echo"ok!"; } else { echo"choose what you are!"; }
You can do the same with "and" instead of "or". Please mention the double "==" if you want to check if it's the same.
Thanks.
I thought that PHP supported the !!/?? syntax.
if (($submituserid or $name) and (!checkPassword($name, $db, $password))) {
Works fine though and or/and is really easier to read... ;-)
You can also use || - or, && - and.
if(statement && statement1): something endif;
if(statement || statement1): something endif;