Code: Select all
<?php
include("products/func_lib.php");
$chosen_id=$_GET['detail_id'];
$selectall=querydb("select * from product_table where $id=$chosen_id");
$title=querydb("select name from product_table where $id=$chosen_id");
$selectNavSoy=querydb("select $id,name from product_table where $id in (28,29,30,31) order by $id");
$selectNavParaffin=querydb("select $id,name from product_table where $id<28 order by $id");
$row=mysql_fetch_array($title);
$name=$row['name'];
?>
<?php
$row=mysql_fetch_array($selectall);
$name=$row['name'];
$meltimg=$row['meltimg'];
$image=$row['image'];
$desc=$row['description'];
echo "<div id='productname'><h2>$name</h2></div><br /><br /><br /><br />";
switch($_GET['i']){
case m:
echo "<img src='images/$meltimg' id='productimage' />";
break;
case tf:
echo "<img src='images/$image' id='productimage' />";
break;
default:
echo "<img src='images/$image' id='productimage' />";
}
echo "<div id='productprice'><strong>Price:</strong><br />
<a href='?i=tf'>24 oz</a><br />
<a href='?i=m'>Melts</a>
</div>";
echo "<div id='productdesc'><strong>Description:</strong><br />
$desc<br /><br />
</div>";
?>