I have an html like this html
<input type="checkbox" class="pushchecks" value="JAN" >
<input type="checkbox" class="pushchecks" value="FEB" >
<input type="checkbox" class="pushchecks" value="MAR" >
I need to get the checked checkbox value and pass to another page by JSON format
JQUERY
$('body').on('click','.pushchecks',function(){
var bills = {}; var i=0;
$(".checks:checked").each(function(){ bills = $(this).val(); i++; });
bills = JSON.stringify(bills);
$.load('process.php', { checkedbills:bills }, '.list',function(){});
});
process.php
$billsAry = json_decode($_REQUEST['checkedbills']);
if i check JAN and MAR check box then i need to display JAN and MAR in process.php page
$.load('process.php?month=jan')and in PHP use the $_GET variable