![]() |
| ||
| displaying multiple images from DB Hi guys I am building a website which allows people to advertise their property online for free. I allow people to upload up to 5 images to my database. I store the name of the file in the database and the image itself is stored elsewhere on the server. I store the file names in the database table under, pic, pi2,pic3,pic4,pic5 I need to check if a filename exists in pic,pic2 etc and if one is present then the image is displayed and if not the code moves on. I have been goven help from other forums but the code I have been goven has not worked. Any help would be appreciated. |
| ||
| Re: displaying multiple images from DB Show us what you have then we will help. We won't just give you code. |
| ||
| Re: displaying multiple images from DB This is what I have so far. I have not included the connection to the database. $houseId = $_GET['houseId']; The idea is that the database table holds the filename of each image in pic, pic2 etc. (ie housse.jpg). If a filename is present then the image is displayed. I printed out $photo to see what result I woudl get and it displays the correct pathway for the image but nothing is displayed. I can't see what is wrong. Thanks for any help you can give, as I have been trying to sort this out for weeks. |
| ||
| Re: displaying multiple images from DB if you are saying $photo prints out the path, but you are placing a slash in src edit $photo before you set it as src, then echo it |
| All times are GMT -4. The time now is 7:57 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC