I need some help with retrieving my data from my database and displaying them. I have a field saved as category in the table. I want to be able to list the category names in a link. When I click the link I want to be able to view everything under that category.
I'm assuming this is more like a catalog type. Any good tutorials or tips will help. Thanks.
I can retrieve the category field and use group by to group them. I can't figure out what to do next. I want to be able to create links from the category names and show everything that is under that category.
<?php
//List every image according to categories
$categories = "SELECT * FROM image GROUP BY category";
$categoriesquery = mysql_query ($categories);
while ($categoryrow = mysql_fetch_array($categoriesquery)) {
$categoryname = $categoryrow['category'].'<br />';
echo $categoryname;
?>