Jump to content


Photo

Detecting Screen Size


  • Please log in to reply
3 replies to this topic

#1 master82

master82
  • Members
  • PipPipPip
  • Advanced Member
  • 182 posts

Posted 26 September 2006 - 02:09 PM

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?

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 26 September 2006 - 02:10 PM

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.

#3 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 26 September 2006 - 02:11 PM

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.


right... you could, however do this with javascript and redirect to the appropriate PHP page.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#4 master82

master82
  • Members
  • PipPipPip
  • Advanced Member
  • 182 posts

Posted 26 September 2006 - 02:13 PM

Ok thanks for the feedback - wasn't important anyway - just looking to expand my php knowledge




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users