How can I use AJAX to run a PHP file when the page is loaded, I’m trying to create a small chrome extension and need to run my PHP file however nothing seems to be working I have this so far
var req = new XMLHttpRequest();
req.open(
"GET",
"my_php_file.php",
true);
req.send(null);
I solved with jquery…
(put at the bottom of your page)
I tried a couple solutions on my own that didn’t work b/c I needed to do multiple calls on page load and finally went with the JQuery solution I could find.
Hope that helps…