2 products with the same name found...
Posted: Thu Feb 05, 2004 1:40 am
Ok so i am making an order form that you type in a ID number and a quantity and it will call the database and fillout the missing data and add the data to a "cart" and sometimes in my database a product from different companies has the same ID number, but i don't want to make another set of unique ID numbers just for my shop.
So how would i go about coding something that does this when i type in the ID number and hit submit:
Looks up the ID and check for duplicates
If there are any duplicates, it takes the data from the duplicate rows and puts it in a html table, then i need a way to use like a radio button to input which duplicate i want to add to the order. Then hit submit and it adds to order.
If there are not any duplicates i want it to just add to the order form.
Cause i am also trying to make one so when you search for a last name to get a Customer Id number and there are multiple names i need it to pick with a radio button and hit submit, that it takes a Variable (like the user_id) and submits that to the next page.
Also in general how do i write things where i need it to work like this:
query the DB
if #of results = 1 { add to order ]
else
{ make a table with radio buttons where i can pick which one i want and it would take a variable of my choice that was displayed (like ID number) and submit it to the next page. }
Ok sorry so long but thats for the help.
So how would i go about coding something that does this when i type in the ID number and hit submit:
Looks up the ID and check for duplicates
If there are any duplicates, it takes the data from the duplicate rows and puts it in a html table, then i need a way to use like a radio button to input which duplicate i want to add to the order. Then hit submit and it adds to order.
If there are not any duplicates i want it to just add to the order form.
Cause i am also trying to make one so when you search for a last name to get a Customer Id number and there are multiple names i need it to pick with a radio button and hit submit, that it takes a Variable (like the user_id) and submits that to the next page.
Also in general how do i write things where i need it to work like this:
query the DB
if #of results = 1 { add to order ]
else
{ make a table with radio buttons where i can pick which one i want and it would take a variable of my choice that was displayed (like ID number) and submit it to the next page. }
Ok sorry so long but thats for the help.