Omaruchan Omaruchan - 5 months ago 17
PHP Question

Ajax POST sending back empty response

I'm having a problem with Ajax and POST, as it is not working, sending an empty response, I'm working with text (not Json) data.

Here's the javascript code:

type: "POST",
url: "php/bddAlumnoElements.php",
data: "methodo=setLecturas,idLectura="+CurrentLecture,
async: true,
success: function(response) {
cache: false,
contentType: false,
processData: false
return false;

And here's the simple php code I'm using

echo "blah!";

I've also tried the php code like this

$message= "blah!";

The response alert is always blank, so I have no idea what's going on, any suggestions?


Change here , to &

   data: "methodo=setLecturas&idLectura="+CurrentLecture,

Parameter separates by symbol & not by commas , so methodo value becomes unwanted concatination with comma.