Hello
My knowledge in PHP is basic, but I will understand the explanations in the best way.
My goal is to create a homepage index.php where it gets the screen resolution of the user and this data X and Y are stored in variables and thus a form. The page would automatically call another page where the JS variable values are used by PHP.
I have not yet learned Mysql to formulate a database. I have already seen several options to send variables up per link, but none worked properly.
The little I know about JS is enough to automatically get the result through this code below:
<script>
var x = screen.availWidth;
var y = screen.availHeight;
alert("LARGURA: "+ x +"\nALTURA: " + y)
</script>
Of course without the alert for the page to be able to call another without user intervention.
In my searches I know that in a single file you can not use the JS variables in PHP because PHP runs on the server and JS on the user
As you can see I thought of using a form that would fill itself with the value of the JS variables. The problem that in JS I am more than noob. So in the other file named below the php would use the data that is stored in the form.
I saw a few alternatives here, but none of them I actually managed to use properly and it occurred to me that this alternative would be faster.
Thanks in advance.