Can i detect screen resolution with PHP, then have an ELSEIF statement with popular screen resolutions with a better suited background for each resolution?
All the solutions i have found use javascript, my question is can it be done with PHP alone?
@felgallMar 20.2008 — #Why do you care what the screen resolution is? You only get to fill the inside of the browser window with your content so if the browser window is 750x500 in area it doesn't matter that the screen resolution is 1600x1200.
The PHP runs before the page is sent to the browser and so the size of that browser window is not known to the PHP. You'd need to browser to send back the information to the server in order for PHP to know the resolution and you'd need JavaScript to do that.