Ok.
Im not brand new to PHP, but I'm feeling it today.
I have a web site. I am using some simple php at the moment, and later on will develop the site further.
Right now, I have say four pages, each including the header and footer of the page, two css pages, one for 800x600 and one for 1024 browsers.
Now, I have a function, on the index.php (home page) that uses a function to check browser and resolution size of the user's page.
It uses a getsize.htm file... and sends the information back to the home page.
This is working great, and I have gotten the table_width variable and the $css_page variable to send the user to the appropriate file attachements to view appropriately.
But...
When the user then clicks on a button, to take them to another page, say "order" the variables I have collected don't pass, and the tables and css page don't attach.
Help!!!!!???!!!!! please?
the getsize.htm page:
<HTML>
<HEAD></HEAD>
<BODY onload="document.infoform.submit();">
<FORM NAME="infoform" ACTION="home.php" METHOD=POST>
<INPUT TYPE=HIDDEN NAME=getsize VALUE=true>
<script language="JavaScript">
<!--
document.write('<INPUT TYPE=HIDDEN NAME=maxwidth VALUE=\"' + screen.width + '\">');
document.write('<INPUT TYPE=HIDDEN NAME=maxheight VALUE=\"' + screen.height + '\">');
//-->
</script>
</FORM>
</BODY>
</HTML>
the home page (or index but i've named it home.php):
<?php
if(!$_POST["getsize"])header("Location: getsize.htm");
$client_maxwidth = $_POST["maxwidth"];
$client_maxheight = $_POST["maxheight"];
echo "maxwidth: $maxwidth<br>";
echo "maxheight: $maxheight<br>";
// use these in the rest of your code.
if ($maxwidth > 1000) {
$table_width = "1000";
}
if ($maxwidth < 1000) {
$table_width = "760";
}
echo "table_width: $table_width<br>";
if ($table_width == 1000 ) {
$css_page = "tayhawk.css";
}
elseif ($table_width != 1000) {
$css_page = "tayhawk2.css";
}
echo "Css Page: $css_page<br>";
echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";
$browser = get_browser();
foreach ($browser as $name => $value) {
print "<b>$name</b> $value <br />\n";
}
global $maxwidth;
global $maxheight;
global $table_width;
global $css_page;
include "header.inc";
phpinfo();
?>
<html>
<head>
<LINK REL=StyleSheet HREF="<?=$css_page?>" TYPE="text/css">
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="formInfo" method="post">
<table width="<?=$table_width?>" cellpadding="2" cellspacing ="2">
~body info~
</table>
</form>
</body>
</html>
<?php
include "footer.inc";
?>
And the button taken from header.inc:
<td width="15%">
<button class="headerButton" onClick="window.location.href='order.php'">ORDER</button>
</td>
And... the css page is called tayhawk2.css or tayhawk.css
any help or pointers would be great, i'm totally lost it seems.