02-15-2010, 07:02 AM
i have 5 tables in a single html form and i want to insert data into all of them when i click the submit button. how can i do this in php? iam a beginner and i have done insertion for a single table but dont know how to implement this? help me out
02-15-2010, 07:16 AM
how can i do this in php? i Run 5 seperate queries for each table.
02-15-2010, 07:22 AM
I would also look into how you setup your database. Do you really need 5 tables for one form?
02-15-2010, 10:01 AM
yeah in the html form wat iam doing is that by filling all the fields i m sending data to 5 differnt tables in the database. tables are product,category,metatag,productdiscount and relatedproduct. how can it be done?
02-15-2010, 11:00 AM
product,category,metatag,productdiscount and relatedproduct. how can it be done?
I don't know what info metatag has, and I'm not sure about related_product but the other 3 should be able to go in one table.
product_id | product_name | product_category | product_discount
001 | Canon 5d | DSLR | 10
002 | Canon 7d DSLR | 5
003 | 200mm | Lens | 5
004 | 300mm | Lens | 20