I had never noticed before that submitting a form with unchecked checkboxes in it results in those checkboxes not being sent to the server at all. I had always assumed that they should be sent for unchecked even if they are not checked.
we have two ways to solve the question:
Don't add code to specifically handle these individual checkboxes, you can just add hidden inputs after the checkboxes in the HTML with a value of zero or other value like this:
<input type="hidden" name="box1" value="0" /> <input type="checkbox" name="box1" value="1" />
another way is that you can transfer it in the back end.