RE: [PHP] Which link was selected?
| From: | Leonard Burton | Date: | Tue, 04 Feb 2003 14:30:46 +0000 |
| Subject: | RE: [PHP] Which link was selected? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134265@lists.php.net to get a copy of this message | ||
Good Catch,
Be just as an advisement besure to escape those quotes with a backslash \"
Leonard.
-----Original Message-----
From: Götz Lohmsnn [mailto:goetz.lohmann@gmx.de]
Sent: Tuesday, February 04, 2003 4:09 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Which link was selected?
Leonard Burton schrieb:
> 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.
>
ups .. someone was quite faster than me in answering ... and it looks quit
better than my way ... the only thing I want to note ... use "" arround
values
of HTML tags ;-)
--
@ Goetz Lohmann, Germany | Web-Developer & Sys-Admin
\/ ------------------------------------------------------
() He's the fellow that people wonder what he does and
|| why the company needs him, until he goes on vacation.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php