Possible Duplicate:
Data transfer from JavaScript to PHP.
How can i get the browser's height and width to php? Like a data transfer from javascript to php? With using innerHeight and InnerWidth, i think.
(I just need to show user small picture if he has small screensize and big if big and without a data about screensize i cant do it)
I have like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/slideshow.css" type="text/css" />
<script>
document.write('script.php?screen=' + screen.width + 'x' + screen.height');
</script>
</head>
<body>
<?php $lol=$_GET['screen']; ?>
<?php echo "SIZE : $lol" ?>
</body>
</html>
And it doesnt works. What i'm doing wrong?