Okay, so I am using a jquery script to use a get method to pull information from another file like so:
$(document).ready(function() {
$('#calculate').click(function(){
$.ajax({
type: 'GET',
url: '/system/calculate.php',
data: 'amount=' + $('#buyamount').val() + '&coin=<?php echo $coin; ?>' ,
success: function(msg) {
$('#totalprice').html(msg);
}
});
});
});
I want to inert their ip address in the database, but I can't set it in that calculate file because they aren't actually visiting that page to set the IP address. Now, I don't want to use the get function to send their IP address because they could simply edit the ?ip= to whatever they want.
I tried setting it in the calcuate file, but their ip is set as ::1
tl;dr: using jquery to run scrip from another file, can't set IP because they don't visit that page personally.