Okay, I know that PHP in and of itself can't detect a user's screen resoltion, but is there a way of combining JS and PHP to do so?
This is what I've thought up so far and it works, but what I really want to do is have all my code self contained in one php file.
Here's the JS:
<?php
echo ("<html><head>
<script language='JavaScript1.2'>
<!--
if (screen.width==800||screen.height==600) //if 800x600
window.location.replace('indexlores.php')
else if (screen.width==1024||screen.height==768) //if 1024x768
window.location.replace('index.php')
else //if all else
window.location.replace('index.php')
//-->
</script>
</head>
</html>");
?>
What I'm thinking of, is instead of using window.location.replace, is there a way of auto-submitting a hidden form with a variable that will distinguish what type of resolution the user has?
Kind of like this:
<?php
echo ("<html>
<head>
<script language='JavaScript1.2'>
<!--
if(screen.width==1024||screen.height==768)
<form action='$PHP_SELF' method=post>
<input type=hidden name=1078>
</form>
etc, etc...
?>
I'm just not sure of how to auto-submit a form within the JavaScript logic. Is it even possible?
Thanks in advance.