I'm currently using PHP, JAVASCRIPT, MYSQL, XHTML, CSS to develop my site. Note that solutions are not limited to this but preferred if possible.
I have a large MYSQL table of widgets and a page that allows the user to search for a specific widget.
Let's say for example the user types the model name for some widget, the search could return 20 different widget models. Each widget model is different, they all have their own widget unit price and widget model name, etc.
Now comes the tricky part (for me anyways), the user should be able to enter a quantity next to a desired widget html text field.
The user then should be able to push an add to cart button that stores the quantity and the model the quantity it's associated with.
(Design note: A MYSQL query is used to return a list of the search results and I use PHP to echo back the rows of widgets found. Upon each iteration I also display the text field where the desired quantity should be entered. ).
My main problem is figuring out how to associate the MYSQL drawn widget name with the quantity entered by the user and store it together in the cart. Could someone point me in the right direction, I'm not sure how to go about tackling this.
I was thinking I might be able to echo the widget model into text field Id , but then how would I determine after post which model had a quantity... This is probably not the best means to do it, even if it was possible.
Thanks