Form Sample


<% On Error Resume Next If Request.Form("hname") = "" Then ' This part of the script allows a person ' to enter data on an HTML form. %>

This sample shows how to use the Request collection to get information from a posted form.

Your Name:


Movies that you like: (you may select more than one)

Why do you like the movies you've selected?


<% Else ' This part of the script shows a person ' what was selected. %> <% If Request.Form("name") = "" Then %>

You did not provide your name. <% Else %>

Your name is <%= Request.Form("name") %> <% End If %> <% If Request.Form("movies").Count = 0 Then %>

You did not select any movies. <% Else %>

The movies you like are: <%= Request.Form("movies") %> <% If Request.Form("describe") = "" Then %>

You did not say why you like the movie(s) you have selected. <% Else %>

Your description of why you like the movie(s) is: <%= Request.Form("describe") %> <% End If %> <% End If %> <% End If %>