Hello there,
I'm having some troubles with checkboxes. Everything works fine when i checked the checkbox (the form register correctly the value 1 that is attached for checkbox checked), but when it remains unchecked the form don't pass any value, remains blank.
My form looks like this for add.php
<label><h2>Kodi Shtetit</h2></label>
<input type="text" name="shteteKodi" value="<?=$shteteKodi;?>" style="width:50%;" />
and for edit.php looks like this:
<label><h3 style="color:green;">Aktiv</h3></label>
<input id="shteteAktive" name="shteteAktive" type="checkbox" <?php if ($shteteAktive == "1") { echo "checked";} ?> value="1">
The db field type is ENUM and values are 1 and 0
Hope that someone can help me on this. Thank you in advance