There is a checkbox on the page.
<input class="switch__input" name="2fa" id="checkbox1" type="checkbox"> How to handle his switch? I try the given, but the table in a DB is not updated.
if(isset($_POST['2fa'])) { $mysqli->query("UPDATE user SET фact='true' WHERE id='$sesion_id'"); } else { }
фact- Do you have it right in the database? What for? And on the issue - so it is not clear, then? What exactly is wrong - Manitikyl 8:37else, and try - Manitikyl