samedi 29 septembre 2018

my checkbox doest not match the count of data

I made checkbox the data from database and still work, when I click multiple checkbox, the count of data clicked is matches

result console.log enter image description here

the problem when I sending data to filter.php with method post

the count of data received is not matches enter image description here event click jquery

$(document).ready(function() {
                $('#t_pendaftar').DataTable();
                    $('#filter').click(function () {
                     var data = { 'venue[]' : []};
                     var arr = $('.treas:checked').map(function () {
                        data['venue[]'].push($(this).val());
                     }).get();
                     console.log(data);
                     $.post("filter.php",{data : data});
                 });       
                });

filter.php

<?php var_dump($_POST['data']);   if(!empty($_POST['data'])) {
    foreach($_POST['data'] as $check) {
            print_r($check);
     } }   ?>

thank you for attention




Aucun commentaire:

Enregistrer un commentaire