Quick question: Why does the below always compare as false, despite both showing 22 when printed? And no, the constant doesn’t define the int with quotes.
<?php
...
if(count($_POST) != _NUM_TEAM_REG_FORM_FIELDS_)
$fields = $_POST;
else die(Core::FormatError("Incorrect number of form fields."));
?>
Thanks!
Why does the below always compare as false, despite both showing 22 when printed?Beacause you have compared it falsely. (i.e. You have used != instead of ==)
Try below code instead,
Note, I have COMPARED them as EQUAL TO.