Page 1 of 1

HELP: Product Page Template?

Posted: Sun Oct 17, 2010 10:55 pm
by maven2designs
I'm still pretty new to PHP programming and stuff and need some help in the right direction. I've been getting some great help here so far, so thanks a lot in advance again!

Scenario:
Database contains: id, product name, thumbnail url, image url.

The Product page is primarily made of two parts. The product image (which contains description) above, and a row of thumbnails below. The thumbnail locations are derived from the database and that function is now working perfectly. I also have a product upload page that uploads the images to the appropriate folders and writes those 4 values into the database.

The Problem:

When the user clicks on the thumbnails, it should display the product image. I'm not sure if I require a new page for each product? If I do... how do I use templates to create them when the user uploads the new products? Please help. Thanks!

Re: HELP: Product Page Template?

Posted: Tue Oct 19, 2010 9:57 pm
by maven2designs
Any idea where I should start looking. I've been trawling google with little success.

Re: HELP: Product Page Template?

Posted: Tue Oct 19, 2010 10:31 pm
by s.dot
Usually this is done with one page, with a get variable passed in the URL to identify the product.

e.g. product.php?product_id=234

Then, you would pull the product info from the database and fit it into your page template. By changing the product id to another valid product id, the same page would be displayed but with info about the corresponding new product.

Your one page can display unlimited products.