Click to See Complete Forum and Search --> : passing data between pages


codedmind
05-03-2006, 02:20 PM
Hi,

I have to creat a form, user will enter some information, then press a button, fill the credit card information and then press the buttin, now when clicked all the details on the first page and the second page should saved in the database.

(each pages has a form).
I have written a servelet that saves the user information from the wab pages in to the data base.

I can save all the information in to the data base from the current page but My problem is that I dont know how to save the information which user entered on the first page.

So can you please tell me how to keep all the user information untill the credit page come so that i can save all the information in the data base together.

I appreciate any help. It will be good if i can write something using jsp or java script, java servlet.


Thanks
Eva

chazzy
05-07-2006, 10:20 PM
you have 2 options

1) you can add the request.getParameter() (i forget the function name, i feel horrible, and i don't even remember the correct object right now, i need my book) object for each parameter as a field after you send the data over after submitting form page 1 (would need tobe as input parameters, i think). then gather all of page 1 and page 2's data and add it to the database

2) add each page's data to the database after they submit that page. this can have problems when people only fill out page 1 and not page 2 (errant data)