to gather the value from the check boxes:
var filtersArray = $("input[@name='filters']:checked").map(function(i,n){
return $(n).val();
}).get();
Posting to php file
$.post("php/performSearch.php", {
keywords: $('#keywords').val(),
'filters[]': filtersArray},
function(data){
//alert(data);
});
Php doesn't get the array no matter what i do to it I have:
$postedKeywords = $_POST['keywords'];
$postedFilters = $_POST['filters[]'];
Keywords is posted, filters[] is not. I tried print_r....no result..
I tried:
foreach($_POST as $val)
echo $val;
I get the value of $_POST['keywords'] and Array for $_POST['filters'] So it is sent but for some reason i cannot use the values.