Copy/Paste the following code into a file named resolution-test.php and then navigate to it using your web browser.

<HTML>
<TITLE><? echo "For Filippia with Extra Love <3"?></TITLE>
<HEAD>
<?
if(isset($HTTP_COOKIE_VARS["users_screen_width"]))
$screen_width = $HTTP_COOKIE_VARS["users_screen_width"];
else //means cookie is not found set it using Javascript
{
$tomorrow = mktime(0,0,0,date("m"),date("d")+1,date("Y"));
?>
<script language="javascript">
<!--
writeCookie();
 
function writeCookie()
{
//var the_date = new Date("<?echo date('F d, Y', $tomorrow);?>");
//var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_screen_width="+ screen.width;
//var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
 
location = 'resolution-test.php';
}
//-->
</script>
<?
}
 
switch(true)
{
  case ($screen_width > 1200):
    $tablewidth = "1100";
    break;
  case ($screen_width > 960):
    $tablewidth = "950";
    break;
  case ($screen_width > 800):
    $tablewidth = "790";
    break;
  default:
    $tablewidth = "630";
    break;
}
?>
 
</HEAD>
<style type="text/css">
<!--
.style1 {color: #0000FF}
.style2 {color: #0066FF}
.style3 {color: #CC0000}
-->
</style>
<BODY>
<h1 align="center" class="style2"><strong>Your Screen Width is set to:</strong> <?php echo $screen_width; ?><br>
and your Table Width is set to <?echo $tablewidth; ?> Pixels</h1>
<center><table border="1" width="<?echo $tablewidth?>">
  <tr>
    <td>
      TEST
    </td>
    <td>
      LALALA
    </td>
  </tr>
</table></center>
</BODY>
</HTML>