Forums
This topic is locked
Passing form values to next page
Posted 01 Aug 2001 23:41:15
1
has voted
01 Aug 2001 23:41:15 Derek Lofgreen posted:
<font face='Arial'>I have a hidden form field that I want to pass the value along to the next page. I know it's easy but I can't find anything that tells me where and how to put the Request.form("" and the Request.QueryString("". Any ideas?</font id='Arial'>Replies
Replied 01 Aug 2001 23:50:48
01 Aug 2001 23:50:48 Joel Martinez replied:
you got it, just reference the name of the form field in the recieving page as <b>request.form("hiddenfieldname"</b>
just in case, here's a little script that I made that makes it easy to pass all the request.form items from page to page, just put the script in the form.<pre id=code><font face=courier size=2 id=code>for each item in request.form
response.write "<input type=""hidden"" name="""& item &""" value="""& request.form(item) &""">"
next</font id=code></pre id=code>That makes a hidden form field from every form item, then when you post the form, they are passed to the next page.
Joel Martinez
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"
just in case, here's a little script that I made that makes it easy to pass all the request.form items from page to page, just put the script in the form.<pre id=code><font face=courier size=2 id=code>for each item in request.form
response.write "<input type=""hidden"" name="""& item &""" value="""& request.form(item) &""">"
next</font id=code></pre id=code>That makes a hidden form field from every form item, then when you post the form, they are passed to the next page.
Joel Martinez
----------
set rs = conn.execute("SELECT answer FROM brain WHERE question = "& forumPost &"