CodeIgniter Forums

Full Version: show image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
how to show image file from database??

El Forum

[eluser]jentree[/eluser]
I personally would not store the actual image in the database unless there is good reason.
I would store the file name ('myimage.jpg") then in your view:

Code:
<img src="/path-to-your-image/&lt;?php echo $data['filename']" />

...Something like that.

El Forum

[eluser]InsiteFX[/eluser]
Or use CodeIgniter HTML Helper's img tag!

InsiteFX