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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Echo data from one form to anouther

Status
Not open for further replies.

kejar31

MIS
Apr 2, 2003
2
US
I have an ASP form that I created that consists of 3 pages
The fist on asks you to enter your personal information and some billing info. When you hit submit I have the form POST to the second ASP form I call confirm.asp

The second form ( confirm.asp ) simply asks you to confirm the information you entered. I was able to retrieve that information by creating hidden input forms and using <%=request.form(“XX”)%> in the value field then I would just simply readd <%=request.form(“XX”)%> to the back end of the HTML code between the tags to have it both display the info they entered and to add it to an input so I could therefore have a confirm button submit the information to a database.

Example of code
<td width=&quot;377&quot; height=&quot;24&quot;><input type=&quot;hidden&quot; name=&quot;ISDN&quot; size=&quot;3&quot; value=&quot;<%=Request.Form(&quot;ISDN&quot;)%>&quot;><%=Request.Form(&quot;ISDN&quot;)%></td>

this all works great. The database updates just fine and I get a confirmation in which the user can use that back button and correct if they notice a mistake.

Now the problem is the next page

The way I have the information travel to the next page is by using a custom confirmation from the second page. Now what I really want is for the user information to travel from to confirm page to the third one so when the user presses confirm they can move on to a new bill without having to reenter the name ect. ect .
The only problem is since I’m not using a POST to *.asp and the <%=request.form(“XX”)%> is not working. Although I can get the get an echo through the confirmation field component I cannot get it to insert into a form.

Does anyone have any recommendations on how to handle this?? Any help would be greatly appreciated
 
I don't know much about ASP but using the Session object might help you out. Using the ASP built-in Session object your variables (form info) can be used in any ASP page you reference as long as the user is in the same session (window). Also, there is a Microsoft: Active Server Pages (ASP) forum that might be of help to you.

-Volkoff007
 
You can pass the parameter to the third page via the second page a couple of ways

From second page(to send)

Using a link: thirdpage?value1=<%value1%>&value2<%=value2%>

or Response.Redirect&quot;thirdpage?value1=<%value1%>&value2<%value2%>&quot;

Then on third page (to receive)
<%
Dim Value1
Dim Value2
Value1=Request.QueryString(&quot;Value1&quot;) Value2=Request.QueryString(&quot;Value2&quot;)
%>

Then use

<%
Response.Write Value1
Response.Write Value1
%>
to display.
 
Thanks for the quick response guys. I got it working by adding the script <%Session(“Xxsesion”) = request.form(“XX”)%> to the second page.
Xxsesion = the Session name
XX = Formfield on the current form

Then I entered this script into the third page, on the XX form value, to retrieve the Session information
<%=Session(&quot;XXSsession&quot;)%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top