i am trying to post a javascript variable posY to a php file. i get an error Notice: Undefined index: data in C:\xampp\htdocs\Heads_in_the_clouds\submitposY.php
posY is defined in the javascriptn so thats not the problem
heres the code
$.ajax({
type: "POST",
url: "submitposY.php",
data : { data :posY }
});
and the php on submitposY.php is
echo $_POST['data'];