Quantcast
Viewing all articles
Browse latest Browse all 82130

post id in session not by $_GET in URL

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

$(document).ready(function() {
   $('#tbl_purchase_invoices').dataTable( {
	            "aoColumnDefs": [
                                {
				"mData": null,
                "sDefaultContent": "Edit",
                "fnRender": function ( oObj ) {
                return '<a href="pay_invoice.php?var='+oObj.aData[1]+'">Pay invoice</a>';
                                },
                "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
	
				   }
					}
					  )
						});

</script>



Viewing all articles
Browse latest Browse all 82130

Trending Articles