I have this form:
<form name="settings" action="../ajax/account/account_ajax.php?token=<?php echo $token; ?>"
class="form-horizontal" method="post">
<input type="hidden" name="set_settings" value="1">
<div class="row">
<div class="col-md-5">
<label class="checkbox-custom">
<input name="earning_sound"
<?= ($settings->earning_sound) ? 'checked="checked"' : ''; }?>
value="1" type="checkbox">
<i class="fa fa-fw fa-square-o checked"></i>
Earning Notification Sound
</label>
<button type="submit" class="btn btn-primary ">
<i class="fa fa-edit"></i> Save
</button>
</div>
</div>
</form>
How I can save with value 1 when I check and how I can save with value 0 when I uncheck!