0

Hi

I have

1.database already set up with around 5000 products with all fields required.

2. create a page template with query code and code to echo out the results of the fields of a product.

I now need to know how to make each product from the database produce a page based upon what i already have.

Please can someone help as i have been searching the net for hours to try and find something to help

Thanks in advance

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by nimtronican
0

I'm not 100% positive I know what you're asking because page 2 kind of sounds like the same thing as what you are asking for but I'll give it a guess.

Each product in the database should have a primary key, probably something like productID or pID. Create one page like viewProduct.php that requires a variable in the GET. Links to this page would look something like viewProduct.php?productID=136. Then you only pull data from the database where the productID(in the database) is = to that productID(in the GET).

I hope this gives you a good starting point.

Edited by Tsorf_Dev: n/a

0

thanks for your reply, i will try and serach for that information you have given me

0

The querystring holding the id value is the key to this. Pick it up with $_GET. Use the value in your db select query.

0

Use this Keywords to Search in Google for what you want to do!!!

1. creating database driven php pages
2. PHP MYSQL Database driven Product Pages
3. MYSQL and PHP + Product Pages

All the Best!!!

Hi

I have

1.database already set up with around 5000 products with all fields required.

2. create a page template with query code and code to echo out the results of the fields of a product.

I now need to know how to make each product from the database produce a page based upon what i already have.

Please can someone help as i have been searching the net for hours to try and find something to help

Thanks in advance

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.