Pass the parameter from the JS script according to the documentation like this (https://editor.datatables.net/reference/option/ajax.data):
ajax: {
url: 'php/staff.php',
data: {
"user_id": 451
}
},
Sorry, but I didn't find how to accept it on the server. I do this:
$user_id = $_POST['user_id'];
DataTables swears, how is it correct?