I have a javascript function that loads a PHP page and passes a variable(testvar) to it
function selectcity()
{
var testvar = "test text";
$("#list").load("selectcity.php?testvar");
$.ajaxSetup({ cache: false });
}
Now in the selectcity.php page,I am trying to retrieve the variable like this : But not working,Can someone pls help.
<?php
echo $_GET['testvar'];
?>