Ajax not working in php why..? | Sololearn: Learn to code for FREE!


Ajax not working in php why..?

Ajax functions are not working in php with mysql

5/18/2019 4:20:32 PM

Kochu Virad Manesh

6 Answers

New Answer


Do you have any errors in your browser's console during the execution of this code? I think this may be because of the CORS policy, which blocks the file protocol. It is better to use HTTP or HTTPS protocol for requests. Here's a lesson for you: https://www.w3schools.com/xml/dom_httprequest.asp


Please, describe your issue. Which ajax functions do not work?


Thank you very much


Am experiencing such a issue too, still battling as usual


function ajax_func() { x


function ajax_func() { xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechance = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ document.getElementByld('get_processed_data').innerHTML = xmlhttp.responseText; } } xmlhttp.open('GET', 'buy_process.php', true ); xmlhttp.send(); }