|
-
Feb 28th, 2001, 10:24 AM
#1
Thread Starter
PowerPoster
I have 2 forms that my users are using to sign up with. What can I do to preserve the first form's information while they move to the second form and then after they fill out the second form then write it to the database?
I have been trying cookies but can I add to the current cookie the second form's information? Like writing to a DB but a cookie instead?
If I have to write to a DB after the first form has been filled out, then how do I add the second form to the correct record?
-
Feb 28th, 2001, 10:30 AM
#2
Addicted Member
Is this information used only in this particular process? If so I wouldnt use cookies or sessions. I would just pass the data through to the last page and then just dump it in the db. Just use the request object to get the info from the form on the next page and put it in a hidden input. then when you submit the form on that page it passes it for the next page to request. Since they ar hidden the user wont see it and your not taking up server memory or storing data on there pc. plus if they have cookies of you not screwed.
-
Feb 28th, 2001, 10:32 AM
#3
Thread Starter
PowerPoster
Thanks for the response.What you are saying makes sense. Can you show me how to pass the data through to the last page? I am using FP2000 as the editor.
-
Feb 28th, 2001, 10:40 AM
#4
Addicted Member
are you using asp?
in you asp code do the following
Code:
<variable>=request.form("<form field name>")
This will request the data in the field from the submitted form. You would then create a hidden input in the next form for that field
Code:
<input type=hidden name=<name of field> value="<%=<variable>%>">
Now that will put the data in the new hidden input. You would have to keep doing this until you got to your last page and then just do the request.form to put it into whereever you need it.
-
Feb 28th, 2001, 11:07 AM
#5
Thread Starter
PowerPoster
Do I place this code on the form where the info is being passed through?
-
Feb 28th, 2001, 11:16 AM
#6
Thread Starter
PowerPoster
Do I place the code within the <%%> like this ?
<Reg1FirstName>=request.form("<txtReg1FirstName>")
-
Feb 28th, 2001, 11:17 AM
#7
Thread Starter
PowerPoster
or like this?
Reg1FirstName=request.form("txtReg1FirstName")
-
Feb 28th, 2001, 11:21 AM
#8
Addicted Member
like this
<% Reg1FirstName=request.form("txtReg1FirstName") %>
the <% and %> signify the begining and ending of the asp code for the server. you can put multiple commands inside them.
Try visiting
http://www.asp101.com/
its a decent site on basic asp coding
-
Feb 28th, 2001, 11:22 AM
#9
Thread Starter
PowerPoster
ok thanks just confirming what I already know
-
Feb 28th, 2001, 11:26 AM
#10
Addicted Member
Any time
-
Feb 28th, 2001, 11:38 AM
#11
Thread Starter
PowerPoster
ok i have this code on the first form:
<%
Reg1FirstName=request.form("txtReg1FirstName")
Reg1LastName=request.form("txtReg1LastName")
Reg1Type=request.form("lstReg1Type")
Reg1Badge=request.form("txtReg1Badge")
Reg2FirstName=request.form("txtReg2FirstName")
Reg2LastName=request.form("txtReg2LastName")
Reg2Type=request.form("lstReg2Type")
Reg2Badge=request.form("txtReg2Badge")
Reg3FirstName=request.form("txtReg3FirstName")
Reg3LastName=request.form("txtReg3LastName")
Reg3Type=request.form("lstReg3Type")
Reg3Badge=request.form("txtReg3Badge")
Reg4FirstName=request.form("txtReg4FirstName")
Reg4LastName=request.form("txtReg4LastName")
Reg4Type=request.form("lstReg4Type")
Reg4Badge=request.form("txtReg4Badge")
Reg5FirstName=request.form("txtReg5FirstName")
Reg5LastName=request.form("txtReg5LastName")
Reg5Type=request.form("lstReg5Type")
Reg5Badge=request.form("txtReg5Badge")
Reg6FirstName=request.form("txtReg6FirstName")
Reg6LastName=request.form("txtReg6LastName")
Reg6Type=request.form("lstReg6Type")
Reg6Badge=request.form("txtReg6Badge")
Reg7FirstName=request.form("txtReg7FirstName")
Reg7LastName=request.form("txtReg7LastName")
Reg7Type=request.form("lstReg7Type")
Reg7Badge=request.form("txtReg7Badge")
Reg8FirstName=request.form("txtReg8FirstName")
Reg8LastName=request.form("txtReg8LastName")
Reg8Type=request.form("lstReg8Type")
Reg8Badge=request.form("txtReg8Badge")
Reg9FirstName=request.form("txtReg9FirstName")
Reg9LastName=request.form("txtReg9LastName")
Reg9Type=request.form("lstReg9Type")
Reg9Badge=request.form("txtReg9Badge")
Reg10FirstName=request.form("txtReg10FirstName")
Reg10LastName=request.form("txtReg10LastName")
Reg10Type=request.form("lstReg10Type")
Reg10Badge=request.form("txtReg10Badge")
%>
Do I then put the
<input type=hidden name=<name of field> value="<%=<variable>%>">
on the second form requesting this information or the other way around?
-
Feb 28th, 2001, 12:35 PM
#12
Thread Starter
PowerPoster
Now I get this crazy error:
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/ReclaimAmerica.org/Conference/register3.asp, line 153, column 15
Response.Write(<Reg1FirstName>)
--------------^
I don't even have this code on the page.
Any suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|