//tbl_product_area title, headTitle, headDesc, headKW
//tbl_prod_page prodAreaID, prodAreaImg, prodAreaImgAltTag
$pageID = $_GET["a"];
$con = @mysql_connect('localhost' , 'qual321', 'noocu1eoyo') or die(mysql_error());
$rs = @mysql_select_db('qual321', $con);
$sqlGetProds = '
SELECT prodPageID, prodAreaImg, prodAreaImgAltTag, prodAreaTitle
FROM tbl_prod_page
WHERE prodAreaID='.$pageID;
$rs = @mysql_query($sqlGetProds, $con);
while ( $row = mysql_fetch_assoc($rs)){
$prodPageID = $row['prodPageID'];
$title = $row['prodAreaTitle'];
$prodImg = $row['prodAreaImg'];
$prodImgAltTag = $row['prodAreaImgAltTag'];
$product = array($prodPageID, $title, $prodImg, $prodImgAltTag); //create a array to represent an individual product
$prodList[] = $product; //then an array of the products
}
$numberOfProds = count($prodList);
$prodRow1 = array($prodList[0],$prodList[1],$prodList[2]);
$verticalLineHeight = 250;
if ($numberOfProds>3)
{
$prodRow2 = array($prodList[3],$prodList[4],$prodList[5]);
$verticalLineHeight = 500;
}
//foreach array of 3 draw a row.
@mysql_free_result($rs);
?>
//print_r($prodList);
//echo "
";
//print_r($prodRow2);
?>

|
if($prodRow1[1][1]!="") { ?> } ?>
|
if($prodRow1[1][1]!="") { ?>

} ?>
|
if($prodRow1[2][1]!="") { ?> } ?>
|
if($prodRow1[2][1]!="") { ?>

}?>
|
|
if($prodRow1[1][1]!="") { ?>
} ?>
|
if($prodRow1[2][1]!="") { ?>
}?>
|
if ($numberOfProds>3)
{?>
 |
 |
 |
|
|
|
|
|
|

|
if($prodRow2[1][1]!="") { ?>

}?>
|
if($prodRow2[2][1]!="") { ?>

}?>
|
|
if($prodRow2[1][1]!="") { ?>
} ?>
|
if($prodRow2[2][1]!="") { ?>
} ?>
|
}?>
|