Page 1 of 1

Dynamically generate radio buttons and insert into lookuptbl

Posted: Thu Oct 12, 2006 7:52 pm
by laknal
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.

Posted: Thu Oct 12, 2006 9:23 pm
by neophyte
Not following, can you explain a bit more. Where's your PHP code?

Posted: Fri Oct 13, 2006 5:12 am
by Ollie Saunders
I need some to get desired
Me and you both but we won't find any on programming forums now will we? :P:D