|
I'm developing an e-Commerce site and have got this for my database:
CREATE TABLE `products` (
`prodnum` varchar(10) NOT NULL default '',
`name` varchar(50) NOT NULL default '',
`category` text NOT NULL,
`image` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`price` text NOT NULL,
`dateadded` timestamp(14) NOT NULL
) TYPE=MyISAM;
What I want is to create an admin section where I can add a new Product using a PHP page with a form - add product number, name, description, product image, price and date added. Then I want to be able to specify which Product Category the product is added to using a Drop Down box in the form. Is my SQL correct to do this, or should Product Category be a separate table? How do I get the form to post the data into the correct category?
It works OK as above except for displaying the product in the correct category. Also, the date does not display on the page correctly. It comes out on the page as 20050602014511.
Thanks for your help.
Last edited by Funky Monk; 06-02-2005 at 10:52 AM..
Reason: Spelling correction
|