PDA

Click to See Complete Forum and Search --> : 4 forms how do i........do this


johnnyboy23
May 3rd, 2001, 03:10 AM
i want to on my 4th asp form take all my data collected from form1 and form 2 and form 3 and form 4 do one insert into my database of the values how do i call the values. i have hidden fields in my forth form how do i get them to reflect the Firstname value of my firstname text box in form 1

i have tried using <%request.form("firstname")%> in the value of my hiiden field on the forth form..

does this make sense
or can anyone tell me an easier way of doing it.

i have an application that i have designed that after my 4th page
take all my values of the text boxes and do 1 insert with all that data into my database.....??? how do i do that at the moment im
inserting values from my first form/page then next one updating then 3rd fomr updating again and this does not seem right if i can parse all my data from all four forms to my last page then do 1 insert??

please help me out this is urgent:confused: :confused: :confused: :confused: :confused: :confused:

thank you

rikshawdriver
May 3rd, 2001, 03:32 AM
Its a long time since I have done something ASP. Still..

After the submission of form1 store the value recieved from the form in a temporary table with an id for submitter (a sessionid or username or something like that). This temporary table would be updated based on the other form data and when the data from the last form is submitted the previous form data can be retrieved from the temporary table and insert into the actual table.

Hope this helps

André
May 3rd, 2001, 03:33 AM
An Idea:

Page1 submit to page2, in page2 retrieve the values into hidden fields, then submit to page3, retrieve all fields into hidden fields, then submit to page4 and yo now have all the fields in one form, submit to the database.

André

Sundance Kid
May 3rd, 2001, 07:08 AM
i have tried using <%request.form("firstname")%> in the value of my hiiden field on the forth form..

Shouldn't it be <%=request.form("firstname")%> (the '=')

Yip... it tried it .. it works :) the '=' is neccesary.

Without the '=' it will not give you an error but just a blank value!

To test it.

Make some of your hidden fields, 'text' (visible) then you will see the values. (just a tip for debugging in the future)

CiberTHuG
May 3rd, 2001, 08:33 AM
Here is another alternative...


<html>
<head></head>
<body>
<form name='Page1' method='POST' action='Page2.asp'>
<input type='text' name='foo'>
<input type='sumbit'>
</form>
</body>
</html>


<%
Session("foo") = Request.Form("foo")
%>
<html>
<head></head>
<body>
<form name='Page2' method='POST' action='Page3.asp'>
<input type='text' name='bar'>
<input type='submit'>
</form>
</body>
</html>


<%
'This is the last ASP after all four forms.
'Each form has set the previous form's submissions into Session
'All I have to do his grab the previous page from Request

mySQL = Session("foo") & Request.Form("bar")
Response.Write(mySQLResult)
%>


I hope that makes sense. I think the session object has a 20 minute timeout. I don't know how it interacts with SSL. It is a step below actually setting cookies on the client's browser.