HELP: Product Page Template?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
maven2designs
Forum Newbie
Posts: 9
Joined: Thu Oct 14, 2010 12:45 am

HELP: Product Page Template?

Post 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!
maven2designs
Forum Newbie
Posts: 9
Joined: Thu Oct 14, 2010 12:45 am

Re: HELP: Product Page Template?

Post by maven2designs »

Any idea where I should start looking. I've been trawling google with little success.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: HELP: Product Page Template?

Post 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.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply