title: PHP AJAX POST VALUE
body: <p>how to post value of checkbox 
  when it checked or uncheked</p>
  
  <p>I have Code </p>
  
  <pre><code>    $("#check").click(function(){`var data = {
                 kd_material:$("#kd_material").val(),
                 check : $(this).val('1') ? $(this).val("1") : $(this).val("0")
                };
  
     $.ajax({
        type: "POST",
        url : "&lt;?php echo base_url().'ms_select/select_id_material_koreksi_cek'?&gt;",             
        data: data,
        success: function(msg){
           $('#div-gudang').html(msg);
        }
      });
   }); `
  </code></pre>