php - how to retrive extra HTTP variables using datatables -
i using datatables plugin jquery , using fnserverparams function.i have sent variables not sure how retrieve them ont server_processing file.
code :
$('#fleetstable').datatable( { "bprocessing": true, "bserverside": true, "sajaxsource": "/server_processing.php", "fnserverparams": function ( aodata ) { aodata.push( { "name": "customerid", "value": "6" } ); } } ); this have tried in server_processing.php file
$customerid = ""; if ( isset( $_get['customerid'] ) ) { $customerid = $_get['customerid'] ; } this not seem working..
thaks help
andre's comment wrong. datatables requires send parameters in format of
aodata.push( { "name": "customerid", "value": "6" } ); this generate url of:
../server_processing.php?customerid=6 in server code,
$customerid = $_get['customerid'] ; should return value. you'll need more debugging in php file determine variable getting lost. spelling mistake.
Comments
Post a Comment