I'm trying to memorize the status of the check box for a preferences page. The status should remain selected or deselected according to the user's choice.
<div class="tab-pane" id="Notifiche">
<div class="row">
<div class="col-sm-4">
<h5>Able/Disable Notify</h5><br>
</div>
<div class="col-sm-4">
<label class="container">
Able <input type="checkbox" name="check" value="1" <?php if (isset($_POST['check'])) { echo ($_POST['check']=='1' ? 'checked' : '');}?> >
<span class="checkmark"></span>
</label>
</div>
<div class="col-sm-4"></div>
</div>
</div>
after page refresh it returns to normal state