Is it possible for a PHP script to pass the values gathered by Javascript?
I'm just thinking if Javacript can capture the screen resolution of the user, can I use that value to run a PHP (IF and Else function) to load a certain php file?
To have a clear explanation,
- The Javascript will detect the user's screen resolution.
- Once the screen resolution is determined, the PHP script will load the correct php file.
- IF screen resolution is GREATER THAN 1200, display PHP file No. 1
- IF screen resolution is GREATER THAN 1920, display PHP file No. 2
- IF screen resolution is LESS THAN 1200 = display PHP file No. 3
by the way, i forgot to mention that the PHP File is just a small portion of a webpage. Let's just assume that the php file is a header. PHP file #1, #2 and #3 have different designs and google advertisements inside.
PHP #1 & #2 has a 728px width google adsense ads while PHP #3 has a 300px width google adsense ads
Is that possible? your help is very much appreciated. Thank you very much! :)