I have a set of checkboxes which when checked they pass the value as 1, otherwise they pass the value as 0. However, instead of sending the value of the unchecked checkboxe
CHANGE YOUR SCRIPT LIKE THIS. HOPE IT HELPS.
$(document).ready(function(){ $('#cb1, #cb2, #cb3, #cb4').click(function(){ $(this).val(this.checked ? 1 : 0); }); });