Dumping Form Information Onto a Web Page
by Amrit HallanByteswoth.com
Thursday, 9th March 2006
Suppose we have the following form. To make the example shorter, I have not used many fields.
<form method=post action=showfields.asp>
<p>Name: <input type=text name="name" size=20><br>
Age: <input type=text name="age" size=20><br>
Location: <input type=text name="location" size=20><br>
Food: <input type=text name="food" size=20></p>
<input type=submit name="sub" value=Submit>
</form>
<p>Name: <input type=text name="name" size=20><br>
Age: <input type=text name="age" size=20><br>
Location: <input type=text name="location" size=20><br>
Food: <input type=text name="food" size=20></p>
<input type=submit name="sub" value=Submit>
</form>
Now we write the code for the file showfields.asp
<%
For Each FieldVal in Request.Form()
Response.Write FieldVal & " -> " & Request.Form(FieldVal) &
"<br>"
Next
%>
For Each FieldVal in Request.Form()
Response.Write FieldVal & " -> " & Request.Form(FieldVal) &
"<br>"
Next
%>
Options:
Printer Friendly
Email Friend
About The Author:
Amrit Hallan is a freelance web designer. For all web site development and web promotion needs, you can get in touch with him at amrit@bytesworth.com . For further details, visit http://www.bytesworth.com You can subscribe to his newsletter [BYTESWORTH REACHOUT] on Web Designing Tips & Tricks by sending a blank email at bytesworth-subscribe@topica.com.
Amrit Hallan is a freelance web designer. For all web site development and web promotion needs, you can get in touch with him at amrit@bytesworth.com . For further details, visit http://www.bytesworth.com You can subscribe to his newsletter [BYTESWORTH REACHOUT] on Web Designing Tips & Tricks by sending a blank email at bytesworth-subscribe@topica.com.
