New to php. Can anyone tell me what this means?
if(!isset($_POST['submit']) || $Email!=$ConfirmEmail || !$info_str || !$valid_email)
New to php. Can anyone tell me what this means?
if(!isset($_POST['submit']) || $Email!=$ConfirmEmail || !$info_str || !$valid_email)
It's a bunch of checks to see if certain variables/post fields aren't set, or if the Email and ConfirmEmail variables don't match.
Broken down into pieces:
if( < IF
!isset($_POST['submit']) < NOT (IS SET (POST FIELD 'submit'))
|| < OR
$Email!=$ConfirmEmail < VARIABLE 'Email' IS NOT EQUAL TO VARIABLE 'ConfirmEmail'
|| < OR
!$info_str < NOT (VARIABLE 'info_str' IS A TRUE VALUE)
|| < OR
!$valid_email < NOT (VARIABLE 'valid_email' IS A TRUE VALUE)
)
Note that due to the !
"nots", many of the conditions are actually the opposite of what they would otherwise be (i.e. positive test if $valid_email
is actually a false value - such as being null
).