I want to load data into a jquery datatable with ajax. Also I want to send parameters to the function that pulls the data from the database.
So what I want to do:
$('#datatables').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/results/load-results",
"fnServerParams": function ( aoData ) {
aoData.push( { "quizid": quizid, "questionid": qid } );
}
} );
I want to so send the quizid and questionid and use them in my function. How can I pull them in my function? Tried $_GET but didn't work ..
GETand/orPOSTvars in your php script (load_results) to see what values you have?