Not sure how to implement the following menu on my existing page. Do I need to re-define the PHP table?
Here's the menu include code:
<td><script type="text/javascript" language="JavaScript1.2" src="http://www.ppshealthcare.com/mainmenu.js"></script></td>
Here's my page:
$result = mysql_query("SELECT * FROM akileine_cooling",$db);
if ($result === false) die("failed");
echo "<div style='margin-left: .lin'>
<h2 align='center'><font color=#808080 face=Arial, Helvetica, sans-serif>Akileine Cooling and Soothing Foot Products</h2>
<h4 align='center'>(Select product for additional information and to make purchase)</h4>\n";
echo "<table cellpadding='3' border='1'>";
$counter=1;
function imageSize($width, $height, $percent) {
if(($percent > $width) && ($percent > $height)){
}else{
if($width > $height){
$ratio = $percent / $width;
}elseif($height > $width){
$ratio = $percent / $height;
}elseif($width == $height){
$ratio = $percent / $width;
}
$new_width = $width * $ratio;
$new_height = $height * $ratio;
return "width=\"$new_width\" height=\"$new_height\"";
}
}
while ($row = mysql_fetch_array($result))
{
$image_url = "http://www.ppshealthcare.com/images/$row[product_image]";
$picture = getimagesize("$image_url");
$picture_size = imageSize($picture[0], $picture[1], 150);
echo "<tr><td valign='top' width='15%'>\n";
echo "<font size='+1'><b>$row[product_number]</b></font>
</td>
<td><a href=\"yourpage.php\">$row[product_title]</a></td>
<td>$row[product_desc]</td>
<td>$row[product_price]</td>
<td><img src=\"/images/$row[product_image]\" $picture_size></td>
</tr>";
$counter++;
}
echo "</table>";