I have a form with text box, radio button and text area controls. I'm submitting the results to a script that is then displaying the individual items and their results from a loop. The code on the script is as follows:
<%
'display individual items from form
for each collItem in Request.Form
Response.Write(collItem&" = "
Response.Write(Request.form(collItem)&"<br>"
next
'display entire form results
Response.Write(Request.form&"<br>"
%>
When I view the results, the results are scrambled and out of order. If the first 6 controls in my form were first name, last name, address, city, state, zip. My results would return:
first name = George
address = 452 Washington Ave
last name = Williams
city = Springville
Submit = Submit
state = OR
zip = 12345
If I view the string of items that was sent it displays in the correct order:
first+name=first+name&last+name=last+name&address=address&city=city&state=state&zip=zip&Submit=Submit
Why the difference? Why does it scramble it like that and how can I fix it so that the results are displayed in order?
<%
'display individual items from form
for each collItem in Request.Form
Response.Write(collItem&" = "
Response.Write(Request.form(collItem)&"<br>"
next
'display entire form results
Response.Write(Request.form&"<br>"
%>
When I view the results, the results are scrambled and out of order. If the first 6 controls in my form were first name, last name, address, city, state, zip. My results would return:
first name = George
address = 452 Washington Ave
last name = Williams
city = Springville
Submit = Submit
state = OR
zip = 12345
If I view the string of items that was sent it displays in the correct order:
first+name=first+name&last+name=last+name&address=address&city=city&state=state&zip=zip&Submit=Submit
Why the difference? Why does it scramble it like that and how can I fix it so that the results are displayed in order?