MySQL Forums
Forum List  »  PHP

Show images from database
Posted by: Andrea Grimandi
Date: April 18, 2012 01:32PM

Hello there,

I'm not English and I hope you'll understand my bad English. This problem is very important for me.

I can't show images from a database.

The database I've made is very simple and essential, just composed by 3 fields, one of them is reserved for images (type: MEDIUMBLOB). The insert doesn't fail (using a input datafile html form) but when i try to show them it works perfectly but it doesn't show the images. It shows an icon that means "File is too big or corrupted...ecc..ecc...".

I've used this script:

class # extends #{
[connect to database...ecc...ecc...]
$out.="<img src=\"{$var['field_image_in_database']}\">

What's wrong? Maybe in PHP5 I have to do something different?
If are required more informations let me know and I'll post it.

Thank you!

Options: ReplyQuote

Written By
Show images from database
April 18, 2012 01:32PM
April 21, 2012 07:45PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.