Log in

View Full Version : products pages database best scripting language and how



dan.technician
07-22-2011, 09:07 PM
i am currently making a website for a client who wishes to have individual product pages for each product, I don't want to go about making a html page for each product and linking them up because that's unnecessary, i don't have much knowledge further than html, css and javascript. i know this is possible with mysql and php, but is this the most efficient method and how would i go about it? i have xampp and so forth for local script testing and parsing parsing pages, etc. the client is also considering introducing an online payment system too but at a later date. this isn't a concern of mine at the moment but i am taking it into consideration, at the moment how would i build a database and an admin page to manage the products. and possibly a search bar? would php be suitable for this and roughly how would i go about this? i've got a template html page with a global stylesheet, and i've got placements for the product name, product price, product pictures (three max), brief product description, product details. how would i create a database with these fields and get the pages to pull these values from these fields to build pages? and how would i integrate a search facility?

sorry for the repetitiveness and lack in knowledge in this message, hopefully you could point me to a few helpful websites or pages, i'm not asking for code but just a brief explanation on how i would go about it. i probably sound so stupid but thanks in advance.

djr33
07-23-2011, 01:02 AM
PHP and MySQL absolutely. (Or any other combination of serverside scripting language [like PHP] and database [like MySQL].)

You will build a database that contains a table of products, each with specific information for every aspect of the product-- name, path to image, price, etc. Then you will create a PHP page that will display a given product within a template based on the information in the database. You can use a "get" variable (as in page.php?product=17) to tell PHP which product to display. Of course you can also expand this system then into a product list or basic search. (Full text searching is complicated, but searching by category or price, for example, is manageable.)

This is all standard PHP/MySQL knowledge, so start with some tutorials and work from there.

I like the information on this website, even if it is now organized in a strange way (start from the last page):
http://php-mysql-tutorial.com

dan.technician
07-23-2011, 05:29 PM
I think i'll settle for those two then thanks, they seem fairly common and i think i can handle it. Thank you for the help, I thought it was along those lines, that's helpful as I already have my template product page and product list page ready. With the link you gave me at the end, it redirects to the microsoft IIS website, is that the correct site? But otherwise thank you for the help, if you have any other tips that would be much appreciated, thank you.

djr33
07-24-2011, 01:39 AM
Strange. Apparently the www is now required:
http://www.php-mysql-tutorial.com/

dan.technician
07-24-2011, 10:43 AM
thank you very much, i thought it was forwarding to an incorrect page. i will look into this, thank you very much for the help.