I am new to php. I need some to get desired functionality.
I have three tables:
Order Table:
1. Order_id
2. Order details
Product Table:
1. product_id
2. product_name
order_product table:
1. order_product_id
2. order_id
3. product_id
Requirement:
1. when user places order, order_id is inserted into order table and order_product table
2. All products are displayed with 'yes' and 'no' radio buttons.
3. Its mandatory to select either 'yes' or 'no' radio button for each product.
4. All product_ids are entered into order_product table for that particular order_id.
Example:
order_product table:
order_product _id=1
order_id=1
product_id=1
order_product _id=2
order_id=1
product_id=2
order_product _id=3
order_id=1
product_id=3
OR
order_product _id=1
order_id=1
product_id=1,2,3
I unable to insert more than one product into the order_product table.
If change my product table, so that each product has its column, then I was able to generate radio buttons:'yes' and 'no' for each product.
Any help is appreciated.
Dynamically generate radio buttons and insert into lookuptbl
Moderator: General Moderators
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK