tags:

views:

73

answers:

4

I want to create a product website with 80 pages. Its a product showcase and I have 70 products with its images and specifications. If its in html , I have to create 70 pages, i would like to do it in php and my sql. What I would like to do is , I will create a template for the product page.On click of each product name , the details of the product such as image , product name , specifications should load. The strucute of the site site is like this

home

products

category 1

 product 1
 product 2
 product 3
 product 4
 product 5
 ....
 ....
 product 30

category 2

 product 1
 product 2
 product 3
 product 4
 product 5
 ....
 ....
 product 30

category 3

 product 1
 product 2
 product 3
 product 4
 product 5
 ....
 ....
 product 30

contact

How can I do this with php and mysql. Basically i am a UI developer and I have some practical knowledge in php. I dont know mysql. Can anybody guide me where to start . Is there any tutorial available for this?

thanks a ton in advance navii

+2  A: 

http://www.codewalkers.com/c/a/Database-Articles/Create-dynamic-sites-with-PHP-MySQL/ - good old Google!

Alex
+1 for initiative - I'd have NEVER thought of that!
DavidYell
+4  A: 

Simplest solution would be to check out a CMS like Joomla! (http://joomla.org) or Drupal (drupal.org?)

Andrew Cooper
Agree. But this could make styling more difficult.
Jonas Wouters
+1  A: 

Your question is way to general to give a good answer in 5 minutes.

There are many dozen ways you could implement what you describe. I would start looking into some of the frameworks available for developing this. But that is my preference.

I would start with the tutorials for:

and see if that could get you started.

otherwise:

  • model your database with a 'categories' and a 'products' table
  • create a php file you call template something and give it the extention .phtml if you feel like it
  • create a script named product.php and let it take an argument like product.php?id=23
  • in your script select the database for product with id=23 and populate your template with the data from the database.
thomasmalt
A: 

I will also second the idea of simply 'googling' but since that isn't always productive :D I suggest browsing Net Tuts, which is part of the Envato/Tuts+ network. They are a very PHP-centric site and have a ton of great PHP and CMS material, as well as a great series called "Magento For Designers" which is about building an e-commerce site on PHP. http://net.tutsplus.com/tutorials/php/magento-for-designers-part-i/ . Also, for PHP in general, they cover a ton of bases and have been going in a great direction with their OOP material lately.

Matt Schweers