You will want to check the value from the field, and create the proper html for checking the check box.
So if they check the checkbox the value is one, if they didn't check it the value is 0.
//is it 1 or 0
if($type){
///if it's 1 (true) then we add 'checked' to a variable we will use in the input
//to cause it to be checked
$checked = 'checked';
}else{
//if the value is 0 (false) we set the variable to be empty, not checked
$checked = '';
}
//now we use this variable in the html input to make it checked or not.
echo "<input style='font-size:10px;' name='type[]' type='checkbox' value='$type' checked='$checked'>";
You will probably want a static value on the checkbox, instead of $type make it 1. Currently you have it setup so that if I didn't set type on the add (it's 0), then when i come back to update it's grabbing my previous value as the value, which will be 0. So even if i check it it will update it to 0, not 1.
This will not allow you to update the value to 0 after it has already be set to 1 however. You will need two inputs, with the same name to achieve this. One hidden, and one the check box. Basically the checkbox overwrites the hidden value when it gets checked.
<input type="hidden" value=0 name="item[0] />
<input type="checkbox" value=1 name="item[0] />
This way, if the user doesn't check the checkbox, it isn't posted, the value 0 is instead. If the checkbox is checked, it overwrites the 0 form the hidden input and posts the value 1.