I have a checkbox in PHP and I would like to have it checked if the value of the checkbox in the database is 1 and insert "0" in the database if saved and not checked
sample checkbox
  <input type="checkbox" name="chckpagibigcon" <?php 
            if(isset($_POST['chckpagibigcon'])){
                echo 'checked value = "0"';
            }else{
                echo 'value = "1"';
            }
            ?>>