looping through form fields and variables

Results 1 to 2 of 2

Thread: looping through form fields and variables

  1. #1
    Join Date
    Dec 1969

    Default looping through form fields and variables

    I have used this code to collect all the fields in a form:<BR><BR>For i = 1 to Request.Form.Count<BR>itemName = Request.Form.Key(i)<BR>itemValue = Request.Form.item(i)<BR>dateString=(itemName&"="&i temValue)<BR>&#039;Response.Write "<BR>" & itemName<BR>Next <BR><BR>I can&#039;t seem to find any information on how to put these results into variables so I can modify them and add them to a SQL database.

  2. #2
    Join Date
    Dec 1969

    Default If you need the..

    .. fields to be in specific variables, you need to code the page w/ those specific variables:<BR><BR>Dim firstname, lastname, address, city, province, postcode<BR> firstname = Request.Form("firstname")<BR> lastname = Request.Form("lastname")<BR> address = Request.Form("address")<BR> city = Request.Form("city")<BR> province = Request.Form("province")<BR> postcode = Request.Form("postcode")

Posting Permissions

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