how to display an image? |
[eluser]Wondering Coder[/eluser]
hi to all CI community, right now I'm able to save the file_name of the image i've uploaded in my database table but what I want to do now is how can I display the image in my view(just like those in resume photo). Do I need some kind of CI library here?
[eluser]ramm[/eluser]
NO You just need to show the image like any other image, only using the value from database: Code: <img src="path/to/uploads/<?php echo $file_name; ?>" alt="You image description" />
[eluser]R_Nelson[/eluser]
I have a question for the original poster i've been trying to do the same thing how do you get the file name so store it in the DB?
[eluser]ramm[/eluser]
http://ellislab.com/codeigniter/user-gui...ading.html At the end of that page where says: $this->upload->data() There you have an array with all the information of the uploaded file.
[eluser]InsiteFX[/eluser]
Load the CodeIgniter HTML_Helper. Code: $data = array(); InsiteFX
[eluser]Wondering Coder[/eluser]
@R_Nelson you just need to get the file_name of the image you wish to store in the db. you can see my code in this link: http://ellislab.com/forums/viewthread/184167/ |
Welcome Guest, Not a member yet? Register Sign In |