In what scenarios would it be considered a design flaw to not resend checkbox values in PHP forms, and how can this be improved?

When a form with checkboxes is submitted in PHP, if a checkbox is not checked, its value is not included in the submitted form data. This can be considered a design flaw if the unchecked checkboxes are important for the application logic. To improve this, you can include hidden fields with the same name as the checkboxes in the form, so that even if a checkbox is not checked, its value will still be submitted with the form data.

<form method="post">
  <input type="checkbox" name="checkbox1" value="1">
  <input type="hidden" name="checkbox1" value="0">
  <input type="checkbox" name="checkbox2" value="1">
  <input type="hidden" name="checkbox2" value="0">
  <button type="submit">Submit</button>
</form>