screen size
Moderator: General Moderators
-
gavinbsocom
- Forum Commoner
- Posts: 71
- Joined: Tue Sep 30, 2003 9:51 pm
screen size
Is there a function or method or w/e in php that determines the screen size of a persons monitor whether its 1024 x 768 or 800 x 600 ? and if so, does it load a different page? and if so do you need to make 2 seperate pages? or something?
grab the java script code, it's easily availible online, google around for a good one.
then transfer the variable to a php switch page
then transfer the variable to a php switch page
Code: Select all
<?php
$screensize = ""; // insert js variable here
switch ($screensize){
case "800x600":
header ("whatever.php");
break;
}
// continue for other sizes
?>-
Paddy
- Forum Contributor
- Posts: 244
- Joined: Wed Jun 11, 2003 8:16 pm
- Location: Hobart, Tas, Aussie
- Contact:
Not saying that Sami is wrong in any way but I would use a session variable and set it to the resolution. This way you would not need whatever800.php and whatever1024.php and the resolution would be easily passed through your entire site.
Of course, if someone changes their resolution mid session then there would be a problem. But I am sure not many people would do that.
Of course, if someone changes their resolution mid session then there would be a problem. But I am sure not many people would do that.