I have the following code.
$.ajax({ type: "POST", url:"blahblah.php", data: "{}", async: true, dataType: "text", success: function() { if(returning data from blahblah.php == true) window.location.href="http://www.blahblah.com/logout.php"; } });
1) No need to send data.
2) The file "blahblah.php" does some processing and returns either true or false.
3) I want to get an answer, and if true is redirected to another php page.
I donβt know how to read function return data in blahblah.php file!
Thanks in advance. George
source share