I want the table to display the data for a specific month/year.
I have a variable in the client side that contains the month (eg:3) and the year (eg:2014).
How do I pass this data to PHP and include it in the query?
I read the docs and tried in JS:
dataModel: {
//paging: "local",
dataType: "JSON",
recIndx: "id",
location: "remote",
postData: {monthSelect:3, yearSelect:2014},
url: "myscript.php",
getData: function (response) {
return { data: response.data };
}
},
And in PHP:
else if( isset($_POST['what????'])){
$month=???;
$year=????;
}
If there's a better alternative to this, like downloading the whole data and the filtering locally, great. But I also need the totals for columns to reflect only the loaded month/year.
Thanks for helping!