I am trying to display an image which is stored in MySQL Database as a BLOB type. I wrote the image retrieving code in a seperate script - img.php. And I am calling this img.php in my Image command -
<img src="img.php">
I do not know why but my script - img.php is not getting called. I have seen code like this everywhere on the Net but for some reason it does not work for me.
Any help would be appreciated. Thank you
Image display problem
Moderator: General Moderators
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
- ambivalent
- Forum Contributor
- Posts: 173
- Joined: Thu Apr 14, 2005 8:58 pm
- Location: Toronto, ON
Without seeing img.php, we have to resort to guessing. I'll go first: are you sending appropriate headers?
Code: Select all
header("Content-type: image/jpeg");