I have the line
xmlhttp.open("GET","file.php?id=4",true);
This does not work since file.php is not in the same folder but rather in a different private folder not visible to the public.
Is there a way to use the open function to open a file in a different folder?
That’s fundamentally impossible.
If you want to send an HTTP request to it, it must be visible to the public over HTTP.