Forum Moderators: coopster

Message Too Old, No Replies

operator question

         

sodani

12:43 am on Feb 13, 2007 (gmt 0)

10+ Year Member



I'm trying to figure out what the!== means in the following code. Can someone tell me?

if($_POST['CaptchaStr']!== $_POST['hash'])
print 'captchacorrect';
} else {
print 'captchaincorrect';
}

ericjust

1:00 am on Feb 13, 2007 (gmt 0)

10+ Year Member



if($_POST['CaptchaStr']!== $_POST['hash'])

This is just comparing the $_POST['CaptchaStr'] to $_POST['hash'];

The!== as opposed to!= (or === as opposed to ==) just means that it also checks the type.

$one = '1';
$two = 1;

$one == $two (true)
$one === $two (false)

jatar_k

1:10 pm on Feb 13, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



[php.net...]