Jump to content

Passing file location from nav bar


kurt.santo
 Share

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...