I am completely new to Ajax (Jquery POST), and I wrote this thing to try to "talk" to a .php file:
function send(d){
$.post("http://somesite.net/read.php",{data:d})
.done(function(data){
document.getElementById('res').innerHTML=data;
});
}
Read.php:
$d=$_POST["d"];
echo $d;
So, it does return stuff, but it seems like it returns the entire file. It is very likely I am doing something incredibly wrong. I would like to know what it is.