Hi guys having a little problem getting my brain wrapped around this, im new to php and need some help, on my homepage i have a product spotlight container. In this container i would like to pull information from a table in my database and display the relevant content.
I get the data to display but not the image for the related post! So my question is this how to i associate a img with a specific row in the table?
and then display those results? Point me in the right direction please or a tutorial somewhere on the net
Well instead of storing the image itself in the database you can store its path/URL in the table. Then on retreiving the content from the table set the URL as the src of an img tag or as background image of an element.
Another solution is to store the image using the BLOB datatype. I don't know much about it. I use the path solution in my projects. Refer to Atli's answer at this link: Link