post id in session not by $_GET in URL
post id in session not by $_GET in URL
upshire
Posts: 13Questions: 0Answers: 0
When I click on a row in my table, it goes off to another page to draw info from a server processing script for further work.My problem is that the method I am using passes the unique id in the URL which leaves things wide open from a security point of view. How would I pass the row info in the script below to the next page in a session?
Thank's in advance
[code]
$(document).ready(function() {
$('#tbl_purchase_invoices').dataTable( {
"aoColumnDefs": [
{
"mData": null,
"sDefaultContent": "Edit",
"fnRender": function ( oObj ) {
return 'Pay invoice';
},
"aTargets": [ 9 ]
}
],
"bProcessing": true,
"bServerSide": true, //$comp_id = $_SESSION['sess_company_id'];
"sAjaxSource": "datatables_data/purchase_invoice_data.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "company_id", "value":"<?php echo $comp_id; ?>"} ); // <--- replace id with your id
}
}
)
});
[/code]
Thank's in advance
[code]
$(document).ready(function() {
$('#tbl_purchase_invoices').dataTable( {
"aoColumnDefs": [
{
"mData": null,
"sDefaultContent": "Edit",
"fnRender": function ( oObj ) {
return 'Pay invoice';
},
"aTargets": [ 9 ]
}
],
"bProcessing": true,
"bServerSide": true, //$comp_id = $_SESSION['sess_company_id'];
"sAjaxSource": "datatables_data/purchase_invoice_data.php",
"fnServerParams": function ( aoData ) {
aoData.push( { "name": "company_id", "value":"<?php echo $comp_id; ?>"} ); // <--- replace id with your id
}
}
)
});
[/code]
This discussion has been closed.
Replies
Allan
David