0

Hi, I'm trying to display an image inside a php tag using a file path name I stored in mysql. So far not working.

<td><?php echo "<img src='images/$image'/>";?></td>

$image is the path to mysql. I can echo the path name so I know it works there but I can't display image.

2
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by phpDave
0

Try this:

<td><img src="<?php echo $image;?>"></td>

Edited by lyrico: n/a

0

Thanks,
Tried it but no working. I do have the images stored in images folder and the name of the images themselves in the database

1

oopppssss. Sorry. I forgot to include the folder ^^

$images_folder = "images/";
<td><img src="<?php echo $images_folder.$image;?>"></td>
Votes + Comments
correct answer
0

Thanks, still not working but I'm going to mess with it a bit. I like this approach better. Thanks again.

0

Thanks, I had one more problem with path name inside of database, works awesome now.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.