I'm writing Analytical software that uses javascript but mainly PHP to log things

The javascript posts some result to $_GET variable like this

document.location.href = "?screenwidth=" + screen.width + "&screenheight=" + screen.height; but this requires the page to reload for PHP to process it.

However the page CANNOT reload every time someone visits, because it disrupts the user experience too much.

Is there a way, in javascript or PHP, of opening dynamically the PHP file, not in an iframe, cos that messes up the formatting, so PHP can operate on it and write it to a MYSQL database.

I don't mind if this requires some complicated code - I'm hapy to give it a bash.