display image from mysql with image name

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
warmwhisky
Forum Newbie
Posts: 1
Joined: Sat Mar 13, 2010 2:40 pm

display image from mysql with image name

Post by warmwhisky »

Hi I have image names inside of a mysql database ie "c-major.png"

I am trying to get them to show up instead of just the text for them showing but I am having difficulty.

The code that prints the data is as follows, which I think maybe smarty code, but I really don't know!

Code: Select all

{BEGIN key_image_fieldcolumn}<TD class=borderbody vAlign=middle {$key_image_style}>{$key_image_value} </TD>{END key_image_fieldcolumn}
{$key_image_value} is actually the code that prints the code from the database. but when i try to envelop it with an <img> tag I get errors and it does not display the image.

This is what I have already tried:

Code: Select all

<img src="http://www.gtdb.org/images/key_signatures/{$key_image_value}">
It would be lovely to have the actual key signatures print out in all their glory!!

You can see the list and the image files in the Signature column.

Please help me

Ben
Post Reply