I have a DataTable that won't pass the data parameter via the POST array. The example from the library documentation (https://datatables.net/reference/option/ajax.data) would seem to indicate that this syntax is correct but a print_r of the $_POST array in the PHP file called indicates that the POST array is empty.
$(document).ready(function() {
var mydatatable = $("#mydatatablediv").DataTable(
{
"ajax":{
"url": "path-to-server/backendfile.php",
"contentType": "application/json",
"type": "POST",
"data": {"myeventid":"5"} //replaced with variable in production
}, //end ajax parameter
"columns": [
{"data":"field1","width":"30%"},
{"data":"field2","width":"20%"},
{"data":"field3","width":"5%"},
{"data":"field4","width":"30%"},
{"data":"field5","width":"5%"}
],
"paging":false,
"info":false
});//end dataTable
});//end DOM load