R
Rach
Guest
Hey Everyone,
What i am trying to do put a picture of a product under a particular category for example
action
action.jpg
arcade
arcade.jpg
but right now all i get is the following
action
action.jpg,arcade.jpg
arcade
action.jpg,arcade.jpg
what i am confused on is i am not sure how to link the name of the category with the picture so that a action picture will appear under the action category.
here is the code i currently have
/*<div class='menuhead".$boxtype."'>
controls the blue box that appears above each game section*/
/* <div class='menuheadtext'>"
.$category['name']." ".$category['type']."</div> controls the name of the games being inside the blue box's at the top like
for example arcade games.It also makes
the games appear under category names like arcade games.*/
echo "
<div class='menuhead".$boxtype."'>
<div class='menuheadtext'>"
.$category['name']." ".$category['type']."</div>
</div>
<div class='menutext'>";
$link = get_game_link("id="._sp($game['id']));
$result = mysql_query("SELECT * FROM categorypics order by pd_id");
while($row = mysql_fetch_array($result)) {
echo "<img src=\"$row[products_image]\" alt=\"$row[name]\" />\n";/*this displays
the pictures*/
}
the $category['name'] originally appears in the categories table and the category pics appears in the categorypics table.
categories and categorypics both have in common id and name. They both have the same exact same id values and name values.but i am not sure how to connect the name from categories to the name in categorypics so that the category picture appears under the right cateory. so i am wondering how can i make one particular picture appear under one particular category?
Thank you,
Rachel
What i am trying to do put a picture of a product under a particular category for example
action
action.jpg
arcade
arcade.jpg
but right now all i get is the following
action
action.jpg,arcade.jpg
arcade
action.jpg,arcade.jpg
what i am confused on is i am not sure how to link the name of the category with the picture so that a action picture will appear under the action category.
here is the code i currently have
/*<div class='menuhead".$boxtype."'>
controls the blue box that appears above each game section*/
/* <div class='menuheadtext'>"
.$category['name']." ".$category['type']."</div> controls the name of the games being inside the blue box's at the top like
for example arcade games.It also makes
the games appear under category names like arcade games.*/
echo "
<div class='menuhead".$boxtype."'>
<div class='menuheadtext'>"
.$category['name']." ".$category['type']."</div>
</div>
<div class='menutext'>";
$link = get_game_link("id="._sp($game['id']));
$result = mysql_query("SELECT * FROM categorypics order by pd_id");
while($row = mysql_fetch_array($result)) {
echo "<img src=\"$row[products_image]\" alt=\"$row[name]\" />\n";/*this displays
the pictures*/
}
the $category['name'] originally appears in the categories table and the category pics appears in the categorypics table.
categories and categorypics both have in common id and name. They both have the same exact same id values and name values.but i am not sure how to connect the name from categories to the name in categorypics so that the category picture appears under the right cateory. so i am wondering how can i make one particular picture appear under one particular category?
Thank you,
Rachel