Um... this will not work... look at what you are saying...
CLIENT: Sends request for page
SERVER: Gets page... since its php it processes the php stuff and sends it to the client (so its straight HTML)
CLIENT: Browser sees that there is a tag called <script> and that its javascript... browser parses the Javascript and runs its Javascript in the browser on the Users side.
Do you see now why that wont work? The client cant send anything back to the server. All the javascript is run on your side.
Solution 1:
Put it in a hidden form field... then have the value submitted in a form.
Solution 2:
Put the value in some hyperlink or something
ex.
<script language=javascript>
document.write("<a href='blah.php?screen="+screen.height+">next page</a>")
</script>