kurt.santo Posted September 19, 2007 Share Posted September 19, 2007 How do you pass information from the nav bar with regard to the relevant images for product page? I mean how do you tell the page where the relevant photos are stored (what the name is)?Kurt Link to comment Share on other sites More sharing options...
justsomeguy Posted September 19, 2007 Share Posted September 19, 2007 The only ways to send information to a page are through a form using the $_POST array, through the URL using the $_GET array, or through a cookie or session using the $_COOKIE or $_SESSION array. If you have images associated with a product, then it would be best to store the filenames for the images in a database associated with the product record and send the product ID through the URL so that you can look up the images in the database. Link to comment Share on other sites More sharing options...
kurt.santo Posted September 20, 2007 Author Share Posted September 20, 2007 The only ways to send information to a page are through a form using the $_POST array, through the URL using the $_GET array, or through a cookie or session using the $_COOKIE or $_SESSION array. If you have images associated with a product, then it would be best to store the filenames for the images in a database associated with the product record and send the product ID through the URL so that you can look up the images in the database.Just to summarise and check if I got this right: I store the images (includig path or path in separate column?) in a database. I could have a column for the id, then nine different columns for the nine pictures per product (three thumbs, three main images, three enlargements). Each item on the sidebar has ?id=36 for example attached to the URL and then I use the $_GET array to pass the information to the relevant place. Is this what you mean?Lets take a main image for example <img src="Furniture/Shanghai.jpg" id="big_image" width="398px" height="253px">. The bold bit is the bit where the right picture name (including path) will be send to. How would I do this?Kurt Link to comment Share on other sites More sharing options...
justsomeguy Posted September 20, 2007 Share Posted September 20, 2007 You would have PHP write that image tag and substitute the appropriate file name in there from the database. Link to comment Share on other sites More sharing options...
kurt.santo Posted September 24, 2007 Author Share Posted September 24, 2007 You would have PHP write that image tag and substitute the appropriate file name in there from the database.I will look if I find out how to do that. That sounds doable...Cheers,Kurt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.