The following lines of code in a JS function, were working perfectly well. However, the send()
method, suddenly produced the error below, and can't link in to my localhost
DB ...
xhttp.open("GET", "connect_db.php?q="+str, true);
xhttp.send();
The error from console log, in full, is:
Access to XMLHttpRequest at 'file:///Users/liamjf/.bitnami/stackman/machines/xampp/volumes/root/htdocs/selectQuery.php?q=eu' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https