I'm trying to find the user screen resolution via Javascript and then pass it to PHP on the same page using AJAX without refreshing the page.
I manage to find the screen resolution , but i have no idea how to use AJAX in order to pass the variables to PHP without refreshing the page.
I search the forum and didn't find a got example, please help.
I have:
<script language="javascript">
var viewportwidth;
var viewportheight;
viewportwidth = window.innerWidth,
viewportheight = window.innerHeight
</script>
Now i need help to use viewportwidth and viewportheight as PHP variables.
Thanks...