Aha. Got it. Right - in your DB, if you have a Boolean value, then use that whether or not to insert a 'checked' into the tag:

<input type=checkbox name=chkMyBox checked>

Miss out the checked for an unselected box.