RE: [PHP] Which link was selected?
| From: | Leonard Burton | Date: | Tue, 04 Feb 2003 07:32:28 +0000 |
| Subject: | RE: [PHP] Which link was selected? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134219@lists.php.net to get a copy of this message | ||
Greetings,
You ought to make your link something like
www.foo.com/products.php?autoid=105. and then make a query on your page
that displays the pics based on an autoincrement number in your table.
You ought to be able to make the code something like:
//Display link for product
print "<a href=products.php?autoid=".$row["autoid"].">";
print "<img src=images/".$row["product_pic"]."></a>";
ON your products.php page youd want to have code something like;
if ($auto)
{
$result = "select * from product_info where autoid=$autoid"
if ($result)
{
while ($row = mysql_fetch_array($result))
{
$stuff=$row["stuff"];
$stuff1=$row["stuff1"];
$stuff2=$row["stuff2"];
$stuff3=$row["stuff3"];
}
mysql_free_result($result);
print "All that stuff here";
}
else
{
include "product_display_page.php";
}
I hope it helps.
Leonard.
-----Original Message-----
From: Karina S [mailto:bali1a@freemail.hu]
Sent: Tuesday, February 04, 2003 2:06 AM
To: php-general@lists.php.net
Subject: [PHP] Which link was selected?
Hi,
I put pictures from a database ont the page about my products. If the user
click on a picture I want to give a detailed description about the product.
But how can I get, which picture was selected?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php