Click to See Complete Forum and Search --> : output pictures into table


DMP23
04-18-2006, 09:32 AM
hey guys, having a bit of bother here with outputing pictures from the database in a table. i am referencing the path name of the pictures and not using blob files.

the table output code is below, as you can see the 3rd column in the output is where im trying to reference the picture. this is the code i have at the moment but for the life of me cannot remember how to successfully output the pics.

please advise <tr><td width="30%" height="25">
<font face="verdana" size="1" color="black">
<?php echo $row["itemId"]; ?>
</font>
</td>
<td width="30%" height="25">
<font face="verdana" size="1" color="black">
<?php echo $row["itemName"]; ?>
</font>
</td>
<td width="30%" height="25">
<font face="verdana" size="1" color="black">
<?php echo $row["itemLocation"];
$location = $row["itemLocation"];
echo <img src="$location"> ?>

</font>
</td>

<td width="10%" height="25">
<font face="verdana" size="1" color="black">
$<?php echo $row["itemPrice"]; ?>
</font>
</td>
<td width="50%" height="25">
<font face="verdana" size="1" color="black">
<?php echo $row["itemDesc"]; ?>
</font>
</td>
<td width="10%" height="25">
<font face="verdana" size="1" color="black">
<a href="cart3.php?action=add_item&id=<?php echo $row["itemId"]; ?>&qty=1">Add Item</a>
</font>
</td>
</tr>
<tr>
<td width="100%" colspan="5">
<hr size="1" color="red" NOSHADE>
</td>
</tr>

bokeh
04-18-2006, 10:10 AM
echo "<img src='$location'>";

chazzy
04-18-2006, 10:16 AM
echo "<img src\"".$location."\">";

and bokeh beat me to it

bokeh
04-18-2006, 10:23 AM
echo "<img src\"".$location."\">";

and bokeh beat me to itOops!echo "<img src=\"".$location."\">";Also can be done like this:echo '<img src="'.$location.'">';Or like this:echo <<<END
<img src="$location">
END;

I was just told that Microsoft created AJAXIsn't it true then? :mad:

chazzy
04-18-2006, 10:33 AM
as the legend goes, they were the first to create the xml http request object, but abandoned it as they saw no practical use for it. ECMA later adopted it into the standard.