Forum Moderators: coopster
I run a website and we sell products online. For the most part the whole site is php using a mysql database to store all the sites data. All of the products are in the database with item name, part number, description, picture and price. In each sections page I have a table that prints the item name, picture and price info. And what I would like is to have the item name field be a link that will open the next page and print all the fields in full.. But I don't want to have to make a pages for every item if I don't have to. I am hoping there is a way to make the link carry the into on the item so it was go to the next page and tell it what info to get. Hope I'm making sense.
David.
[edited by: eelixduppy at 5:30 am (utc) on July 16, 2008]
[edit reason] removed specifics [/edit]
Do you have a unique ID associated with each item? You should. If this is the case you can send the ID number through the query to a script that processes and prints the details. The echoing of the link would resemble the following:
echo '<a href="/path/to/script.php?pid=' . $row['pid'] . '">' . $row['name'] . '</a>';
And then on the script.php page you can grab this ID using $_GET['pid'] and then run another query for this specific item.