Ahhhh, don't worry TVPR, the technique I use only involves PHP code, and no mySQL. Anyway, what you need to do is pop the resolution detecting code above in a file called index.html. This will then call a file called interface.php, which includes the following code:
Code:
<?
// PHP Variables for different page sizes (each defined according to type)
// If low rez
if ($res == 'low') {
$centercell = "374";
$bgfile = "images/bg1.jpg";
$iframesize = "240";
$menusize = "";
// If high rez
} elseif ($res == 'high') {
$centercell = "574";
$bgfile = "images/bg2.jpg";
$iframesize = "440";
$menusize = "410";
// If blank or invalid input - defined as copy of low rez
} else {
$centercell = "374";
$bgfile = "images/bg1.jpg";
$iframesize = "240";
$menusize = "";
}
?>
Then include your design HTML in the interface.php file as normal. In bits you want to be variable sizes, replace the pixel height/width with the variable above that depends on resolution with:
Code:
<? echo($VARIABLENAME); ?>
i.e. so you get <td width="100%" height=<? echo($centercell); ?>>, etc.
This isn't the simplest way of doing it, nor the most elegant, but it works an absolute charm and allows variable sizes without the use of alternating style-sheets, totally-seperate low-resolution pages, etc.