Retrieving/Displaying hyperlinked images with PHP

From: Date: Sat, 06 Jul 2002 23:34:54 +0000
Subject: Retrieving/Displaying hyperlinked images with PHP
Groups: php.general 
Request: Send a blank email to php-general+get-105908@lists.php.net to get a copy of this message
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")); //test 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. Mark

« previous php.general (#105908) next »