Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form that pass to another and submit to one database

Status
Not open for further replies.

Jasoncun

Programmer
Mar 13, 2001
2
US
Hi, I need to create two forms that will submit to one database. I can't seem to figure it out without using two database.
 
Hi Jason,

Can you be a little more specific about where you're having trouble? When you say two forms, do you mean two separate forms that a visitor will submit independently? If so, you can have two tables in the same database with each form submitting to a separate table. You can also have both forms submitting to the same table if you need.

If you can provide some details on the problem or the error you're getting, I or someone here should be able to help you.

GJ
 
I am working on the very same thing right now...
You can handle it in two ways. After the submition of the first form, have it either:

1) Pass all the variable to a cookie for each field you want saved, then call it after the second form to submit everything into the database at once.

2) OR you can include that data as a hidden field in the next form, so that it is passed on to the final form.

Solution 1 requires cookies, which can be turned off by the user.. so that may be bad. (A Session Veriable would work too)

Option 2 may be a problem if you are passing large amounts of data. It may get cut off if you use Get (Use Post-- but even then it may be a problem)

---------------------------
What I did was on the 1st page they entered info and on the start of the next form I check to see if the info is already in the Database, if not, I submit that data as a new record, and then submit the new form results into the existing record.

this is very good because the info is being saved and the data is safe... from powerouts or "giveups".

Either way make sure you clear your variables if you are done with them. They hog resources.

-- David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top