Page 1 of 1
how to display images using php + mysql.
Posted: Mon Feb 09, 2009 2:09 am
by ecxzqute
i am developing a small project, i have managed the uploads. now my pain in the neck is to display the images.. i didn't save the images in my db whereas i have put them in a single folder called 'images' and what i have stored in my db is the just the file name.. now i want to display them.. how am i gonna do this?..
any help plz?
Re: how to display images using php + mysql.
Posted: Mon Feb 09, 2009 4:16 am
by samsolomonraj
You need to store the image name with the extension like .jpg, .png. .gif, etc... in the db.
By using the HTML img tag you can display the images..
<img src="image_path/<?php echo $image_name ?>
Your's,
Sam..
Re: how to display images using php + mysql.
Posted: Tue Feb 10, 2009 5:31 am
by ecxzqute
how about if there are more than one image to show?
Re: how to display images using php + mysql.
Posted: Tue Feb 10, 2009 6:34 am
by samsolomonraj
Using foreach concept for displaying multiple images..