Click to See Complete Forum and Search --> : Form to servlet


Katx18
02-15-2006, 02:44 AM
There are two forms in a page (A and B) with only one submit button for both. Is it possible to input submit the values of form A to table A in mySQL, then the values of form B to table B when I hit the submit button?

We're only allowed to use servlets as html to sql connectors... how do I do this? :(

chazzy
02-15-2006, 05:58 AM
if you have two sets of <form></form> tags then what you're describing is impossible.

otherwise, you should be able to do it with no problem. you need to walk through request.getParamters() to get all of the values and insert them accordingly

Katx18
02-15-2006, 09:00 AM
ahh... so I should just use 1 form then separate elements using a script so that they go to their respective tables? ^_^

Hm... how do I use request.getParameters()? Sorry... I only know very little of this stuff... :(