I am using a simple HTML checkbox in a form to put a 1 for checked and a 0 for unchecked in a field called \"subcheck\" in a MySQL table.
Does the checkbox default t
u should try if statement or ternary condition statement.. if(isset($_POST['subcheck'])) $subcheck = 1; else $subcheck = 0;
or u can try $subcheck = (isset($_POST['subcheck'])) ? 1 : 0;
and in database u should use enum type for subcheck