if (!$errno) means if (not false) or if not 0 (0 meaning false) and not(0) meaning true this if condition must be true
if (!$errno) { /***** this must be true******/) so the errno must be equal to 0 to have a 1 (true) in this case a not(0) will make this condition true or (1)
$returnvalues = json_decode($returnjsonstring, true);
if ($returnvalues['result'] == 1) { (/******** this must be true *******/)
if ($returnvalues['values']['auth'] == 1) (/*******this must be false********/)
if (isset($returnvalues['values']['redirect']))
// redirect to url $returnvalues['values']['redirect']
else
echo "Login successful but no connection token created. Is this intentional?";
else
/****** cause these are the only ways to have a successful login ******/
echo "Login unsuccessful";
} else {
The first if condition return a false and
echo "Some exception occurred using the web service: " . $returnvalues['values']['type'] . " " . $returnvalues['values']['message'];
}
}
Yes but in :
if (!$errno) means if (not false) or if not 0 (0 meaning false) and not(0) meaning true this if condition must be true
if (!$errno) { /***** this must be true******/) so the errno must be equal to 0 to have a 1 (true) in this case a
not(0) will make this condition true or (1) $returnjsonstri ng, true); 'result' ] == 1) { (/******** this must be true *******/) 'values' ]['auth' ] == 1) (/*******this must be false********/) $returnvalues[ 'values' ]['redirect' ])) 'values' ]['redirect' ] 'values' ]['type' ] . " " . $returnvalues[ 'values' ]['message' ];
$returnvalues = json_decode(
if ($returnvalues[
if ($returnvalues[
if (isset(
// redirect to url $returnvalues[
else
echo "Login successful but no connection token created. Is this intentional?";
else
/****** cause these are the only ways to have a successful login ******/
echo "Login unsuccessful";
} else {
The first if condition return a false and
echo "Some exception occurred using the web service: " . $returnvalues[
}
}