I don't know how to put the value from a PHP variable into a jQuery variable. I tried some ways but still it doesnt work.
checkboxstatus = "<?php echo $checkboxstatus; ?>";
Everytime when I do this in database the row looks like:
jQuery(document).ready(function() {
jQuery("#wyslij").click(function(e) {
e.preventDefault();
checkboxstatus = "<?php echo $checkboxstatus; ?>";
jQuery.ajax({
type: "POST",
url: "czekboks.php",
data: {
checkboxstatus: checkboxstatus
},
success: function(result) {
console.log('the data was successfully sent to the server');
}
})
})
})