passing form values through multiple pages

Results 1 to 3 of 3

Thread: passing form values through multiple pages

  1. #1
    Join Date
    Dec 1969

    Default passing form values through multiple pages

    greetings,<BR><BR>I have a form that gets some basic info from a user (i.e. name, address, job title etc). Depending on what the choose as their job title, when they submit the form they will either see the &#039;success page&#039; or see another page with a few more questions and then the &#039;success&#039; page.<BR><BR>The form&#039;s data is just being emailed via CDONTS. I want all the data (i.e. data from both pages if the user sees the 2nd page). Using &#039;post&#039; as the method of my forms, is there a way to append the data obtained in the 2nd form on to what i already have from the 1st?<BR><BR>I know I could write everything to a cookie and retreive it and email it after all data has been provided, but would like to avoid that. I would also like to avoid using a &#039;get&#039; or passing anything though the querystring.<BR><BR>Any ideas?<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default well

    it seems that becuase you don&#039;t want cookies, querystrings etc... then your only real choice is hidden fields, i assume you are using request.form...<BR>just put the values from the 1st page in the hidden fields on the second page and submit the whole thing...<BR><BR>&#060;input type=hidden name=field1 value="My 1st value"&#062;<BR><BR>then request as normal...<BR><BR>sponge

  3. #3
    Join Date
    Dec 1969

    Default Hidden form variables

    On second page, write all the info from the first page into hidden form variables. Then you&#039;ll have them for the next page. Better than using cookies or sessions.<BR>&#060;form&#062;<BR>&#060;%<BR>for each item in request.form<BR>response.write "&#060;input type=hidden name=" & item & " value=" & request.form(item) & "&#062;"<BR>next<BR>%&#062;<BR>&#060;/form&#062;<BR> <BR>Something like that. Tailor the syntax to put the quotes in if you want to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts