ajax how to read out $_post variable
- by alex
Hi,
I am trying to filter/search a database with ajax
$.ajax({
type: "POST",
url: "filterSearch.php",
queryString: qry,
success: function(data){
alert( "Data Saved: " + data );
$('#searchResult').html(data); // Fill the search results box
}
});
Now in filterSearch.php i have the following test codes
if(isset($_POST['queryString'])) {
echo "TEST";
}
if($_POST['runquery']==1) {
$sql = "SELECT * FROM fs_vacatures WHERE here-the-like-query?";
$msg = $sql;
echo $msg;
die();
}
die();
But nor TEST or the $sql is return in the alert??