in reply to Insert into table when user clicks one of many submit buttons

Perhaps I'm missing something in your explanation, but it sounds to me as though you are presenting buyers with a page which has multiple forms each using a submit button, one for each "track" you're offering for sale... and thinking that clicking a submit button will send anything other than what's in its form to the server. Forms, submit and communication between browser and server don't work that way.

If my surmise about your html is correct, you should review html documentation for "check boxes," which allow for multiple selections by a user ... and should also clear up what seem to be some misconceptions about how submit buttons work.

For a decent example of how this would work for you (or so it seems to me), see http://www.w3schools.com/html/tryit.asp?filename=tryhtml_form_checkbox. N.B.: I am NOT suggesting you utilize the html shown there but rather, saying that the code and the demonstration (in the right box) should serve be cogently illustrative of a means to get multiple offerings into a single form.

  • Comment on Re: Insert into table when user clicks one of many submit buttons

Replies are listed 'Best First'.
Re^2: Insert into table when user clicks one of many submit buttons
by ironside (Acolyte) on Nov 28, 2011 at 03:33 UTC

    Thank you for your reply. I am using one form with multiple submit buttons. Using check boxes is a good suggestion, but I was hoping to have the user to only have to click a buy button as opposed to checking of boxes then clicking a buy button. That is the way I see most other sites do it. Perhaps they are using javascript for this?