I am trying to build a "product detail" page that pulls data from a MYSQL
database using PHP. The data for the page includes product images, which I
am trying to link to (i.e. from their location on the web server) instead of
loading the images into the database. However, I cannot find any sample code
that seems to work. Two questions:

1. Is this possible (i.e. to store the HYPERLINK to the image in the
database , and as the results are returned to the product detail screen, the
image file will be displayed)? OR RATHER do I need to store the physical
image file in the database location and query it that way?

2. The code sample below contains several lines that show a field populated
with text that I am returning....the line under the //Test comment is the
field that I'm trying to pull an image back for:

printf("REL_PLAN7: %s<br>\n", mysql_result($result,0,"REL_PLAN7"));
printf("REL_PLAN8: %s<br>\n", mysql_result($result,0,"REL_PLAN8"));
printf("REL_PLAN9: %s<br>\n", mysql_result($result,0,"REL_PLAN9"));

printf(mysql_result($result,0,<a href="FRONT_REND">FRONT_REND</a>);

NOTE: "FRONT_REND" is the name of the database field, and it contains a full
web address, not relative.

Any help would be GREATLY appreciated. Thanks.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to