469,356 Members | 2,013 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

How 2 pass a session/var from 1 form 2 another form


Hi!
For Example,
text for Product code, name (both is text) is from form A and I want
pass the Product Code, and name to form B
using eg. session('txtproduct') & session('txtname').

As in Form, Product code, name is get from database value.

some sample example I try ...

In formA
<form name=forma
method=post action="formAValidation.asp">
<INPUT type="text" name="txtName" value="<%=sName%>">
<input type=hidden name=txtName value="<%=sname%>">
<>

In formAValidation
sName = Request("txtProductName")
p/S: actual, it always get the first value although
the value have change ...

How can I do it???

In FormB how 2 get the product & name value ??
-
jeremylim200
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Jul 19 '05 #1
1 1346
I have done this before and used two forms, form 1 (page1) submits to form 2
(page2) that submits to page 3 which emails and enters into database.

All you need to do is on the second page where the second form resides is

txtproduct = request.form("txtproduct")
txtname = request.form("txtname")

then if you want them displayed on the second form place them in a text box
or write them to screen, if you want to hide the values place them in a
hidden element

eg
<INPUT type="text" name="txtName" value="<%=txtname%>">

then do the same in the page that processes form 2
"jeremylim2000" <je******************@mail.codecomments.com> wrote in
message news:je******************@mail.codecomments.com...

Hi!
For Example,
text for Product code, name (both is text) is from form A and I want 2
pass the Product Code, and name to form B
using eg. session('txtproduct') & session('txtname').

As in Form, Product code, name is get from database value.

some sample example I try ...

In formA
<form name=forma
method=post action="formAValidation.asp">
<INPUT type="text" name="txtName" value="<%=sName%>">
<input type=hidden name=txtName value="<%=sname%>">
<>

In formAValidation
sName = Request("txtProductName")
p/S: actual, it always get the first value although
the value have change ...

How can I do it???

In FormB how 2 get the product & name value ???

--
jeremylim2000
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by edward hage | last post: by
1 post views Thread by crjunk | last post: by
3 posts views Thread by Wayne Wengert | last post: by
3 posts views Thread by serge calderara | last post: by
1 post views Thread by menmysql | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.