post id in session not by $_GET in URL

post id in session not by $_GET in URL

upshireupshire Posts: 13Questions: 0Answers: 0
edited April 2013 in DataTables 1.9
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]

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You could hash the id, or anything else. I don't think this is any more open than any other method of transferring the id or session cookie.

    Allan
  • upshireupshire Posts: 13Questions: 0Answers: 0
    Thank you Allan,I will look in to hashing the invoice number.
    David
This discussion has been closed.