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?
how to display images using php + mysql.
Moderator: General Moderators
-
samsolomonraj
- Forum Newbie
- Posts: 12
- Joined: Mon Feb 09, 2009 3:34 am
- Location: India, Chennai
Re: how to display images using php + mysql.
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..
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.
how about if there are more than one image to show?
-
samsolomonraj
- Forum Newbie
- Posts: 12
- Joined: Mon Feb 09, 2009 3:34 am
- Location: India, Chennai
Re: how to display images using php + mysql.
Using foreach concept for displaying multiple images..