I am having a problem displaying images using php. currently my script checks for info from a database and then goes through and prints it all using a while loop:
while ($row = mysql_fetch_array($result)) {
echo "<tr>\n";
echo '<td><a href="show_member.php?member=' .
$row['id'] . '">' . htmlspecialchars($row['name']) .
"</a>";
Now this works fine, displaying a name link for all the users that are saved in the sql database.
I have images for each user with the images themselves saved in a folder on the root called userpics. The name of each users pic is also saved in the database.
Using this info i am trying to display the image in this way:
echo '<img src="../userpics/$row[\'pic_one\']" width="100" height="150" border="0">';
Its definately reading the name of the file from the database correctly because i checked by echoing the filename.
Someone help please :queasy: