I want to post via JavaScript several vars but I can't, it doesn't do anything.
After a script is done running, I want to send the vars via POST so I can read them with "$_POST" and use them in a PHP script
Here is an example of my Script
function finish()
{
var cnt1 = 50;
var tim = 60;
var hecho = 1;
$.post("index.php", { t:tim }, { m:cnt1 }, { e:hecho } );
}
I could do this:
top.location.href="index.php?e="+hecho+"&t="+tim+"&m="+cnt1;
But I don't want to use GET because users will see the Variables, I want to use POST so is a bit harder to hack.
What I am doing wrong?