the idea is this - when choosing a checkbox, the form should be sent
<form name="upsert" id ="myForm" method="POST"> <input type="checkbox" id="slideThree" name="check" <?= $check ?>/> <INPUT TYPE="SUBMIT" VALUE ="Сохранить"> </form> <script> $(document).ready(function () { $("#slideThree").change(function () { $("#myForm").submit(); }); }); </script>
When you click on the button, the data from the checkbox disappears. when clicking on the checkbox, everything is sent except for the checkbox value