hi
i am a beginner... so its only a hint with this example
you have a base "shop" and the table "link" with entrys:
[FONT=courier new]
iddescriptionlink_pic______picture
1gun'o'matic/pic/gun.gif/pic/gun_hi.jpg
2marvin_____/pic/sadbot.gif/pic/sadbot_hi.jpg
3.....
[/FONT]
- in your first page you have to connect to shop "base"
- select the table "link"
- fetch the row with id of your interest with "SELECT id, link_pic FROM link"
- and store it to a array called $row_link
- you have to read the count of the rows you got and store it to [COLOR]$count[/COLOR]
- then for example bring it all at once with a for-loop:
[FONT=courier new]
<?php
for ($i=1;$i<=$count;$i++) {
echo " <a href = \"http://www.yourdomain.com/product.php?product_id="
. $row_link['id'] . " \"><img src=\" "
. $row_link['link_pic'] . " \"></a> ";
}
?>
[/FONT]
and of course you have to build a reference page for all your products.... the product.php where you place all the important data about the product and load those through the id you recieve from your first page
you get the id with $_GET['id'] if you use newest php4 and $HTTP_GET_VARS['id'] with older
you can query your "product" table with:
sprtintf("SELECT * FROM product WHERE id=%d", $id)
where %d stands for integer id
i hope it helps a little... as i said i could made some errors so i do not write code only but explain the stucture... 😉
chris