Question. I have a website I am building which I am trying to build so that the client will be able to maintain themselves. Since they want ease of deleting categories and/or products,....
Here's a basic layout thus far.
65 Sub category tables with multiple products inserted within.
When the category page is displayed, it shows the products listed with radio buttons and a "select product" button at the bottom.
Once a product is selected, I want a seperate page to open, designated for that particular product. Larger picture, more description, quantity to purchase, and an add to cart button.
What will be the ideal way to accomplish this? I would appreciate any help I can get, and know this is rather vague. Since I am a novice to boot...I'm lost.
Here's how the page is displayed:
[PHP
$query = "SELECT * FROM akileine_cooling ORDER BY product_price";
$result = mysql_query($query)
or die ("Couldn't execute query.");
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 "<form action='showitem.php' method='post'>\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 "<input type='radio' name='interest'
value='$row[product_number]'\n";
if ( $counter == 1 )
{
echo "checked";
}
echo "><font size='+1'><b>$row[product_number]</b></font>
</td>
<td>$row[product_title]</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>";
echo "<p><input type='submit' value='Select Product'>
</form>\n";
[/code]