When we want to post some data to a php page via ajax , any one can see the URL and also the values being post.
It can be very dangerous, is there any way to secure this? Can I hide the URL or any way to encode the URL so users can't see it and access it ?
This is a sample code, as you can see, the URL can data are expose in the source and also on inspectors like Firebug.
function reg_user(id){
$(document).ready(function() {
$.ajax({
type: "POST",
url: "reg_user.php",
data: "id="+id,
success: function(msg){
str=$.trim(msg)
if (str=='ok'){
}
}
})
})
};
thanks