That's it, I use jQuery / AJAX to call the file to save it, someone likes the song or not. I am trying to do something like the following:
var html = $.ajax({ type: "POST", url: "save_song.php", data: "song_id=" + song_id + "&love_like_hate=hate", async: false }).responseText; $("#div_song_id_"+song_id).html(responseText1); $("#love_it").html(responseText2);
Then on the PHP side there is something like this:
echo "This text would go in response text 1"; echo "This text would go in response text 2";
So basically I try to have a multiple echo in save_song.php, and then basically say that the first echo goes to the first div and the second echo goes to the second div, which needs updating. Any idea how to do this?
source share