I have a rather simple question. I'm trying to query the links which go to image files. I then would like to display it on the screen. I'm trying to use 'img scr=' command. There's a brief code below;
mysql_pconnect();
mysql_select_db("mylogin") or die("Could not select database");
$query = "SELECT FROM myimagexx";
$result = mysql_query($query) or die("Query failed : " . mysql_error());
/ Printing results in HTML */
print "<br>";
print "<table width=75% border=1>\n";
print "<td width=14%><b>UserID</b></td>";
print "</tr>";
print "</table>";
while ($row= mysql_fetch_array($result))
{
print "<table width=75% border=1>\n";
print "<td width=8%>";
print $row["imagefilepath"];
$roww="c:/mydirl/data/my/image2.jpg";
print "<img src=$roww>";
print "</td>";
Now if I use the code above, no problem. But how do I pass this variable to the img src comand. The results of the path come from $row["imagefilepath"] in the database. My question is how do I place this $row["imagefilepath"] into the <img src=""> command so that it will be displayed?
If I do it this way, print "<img src="$row["imagefilepath"]>", I will get an error!
Any assistance would be greatly appreciated.
Thanks,
KJ