Jump to content

Archived

This topic is now archived and is closed to further replies.

master82

Detecting Screen Size

Recommended Posts

Is it possible to use php to detect a users screen size (eg 800 x 600) and then use that in an IF statement to adjust an output.

eg

if([screen size] == 800x600)
{
do this
}
else
{
do something else
}

Is it at all possible?

Share this post


Link to post
Share on other sites
Nope. Php runs on the server, doesn't even know what a screen is. Youd need to do this client side with javascript or something.

Share this post


Link to post
Share on other sites
[quote author=thorpe link=topic=109544.msg441667#msg441667 date=1159279813]
Nope. Php runs on the server, doesn't even know what a screen is. Youd need to do this client side with javascript or something.
[/quote]

right... you could, however do this with javascript and redirect to the appropriate PHP page.

Share this post


Link to post
Share on other sites
Ok thanks for the feedback - wasn't important anyway - just looking to expand my php knowledge

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.