Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81971

How do I pass a parameter to a server script?

$
0
0

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?


Viewing all articles
Browse latest Browse all 81971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>