checkbox in js, send to ajax file

PHOTO EMBED

Sun Aug 28 2022 13:15:03 GMT+0000 (Coordinated Universal Time)

Saved by @HamzaNasro #ajax #checkbox

function save_test() {
    showloading();
 
    let AssessmentCategorie = []
    $("input[name='AssessmentCategorie[]']:checked").each(function () {
        AssessmentCategorie.push(parseInt($(this).val()));
    });

 $.post("ajax/save_test.php", {
     
        AssessmentCategorie: AssessmentCategorie,

    }, function (data) {

        $("#save_test").html(data);
        get_test();
        hide_loading();

    });
  
  }
content_copyCOPY