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.

Try this:

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

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

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

$images_folder = "images/";
<td><img src="<?php echo $images_folder.$image;?>"></td>
commented: correct answer +2

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.