Checkbox failing to show correct retrieved value
I have a checkbox on an Update page created with DA.
When the checkbox is ticked the value 1 is saved to MySQL ok.
When unticked, a value of 0 is saved. All good there
However, on returning to the form after an update, the check box is failing to show checked or unchecked, according the the value saved in MySQL record.
Instead it shows checked even when the MySQL value is = 0.
Here is the checkbox code;
<label for="checkbox-01"><input name="eoi-notification" type="checkbox" id="checkbox-01" value="1" checked <?php if (!(strcmp($row_GetUser['hoNotification'],1))) {echo "checked=\"checked\"";} ?> /> Alert me with an email when an expression of interest has been made.</label>
My other radio, drop down and text fields retrieve and show the value as expected.
Any ideas?