|
By Eddy R.
3-6-00
If you have a web site then
you most likely have used forms to collect data from the site's
audience at one point or another.
Every form has three parts - the first is
the HTML that creates the Form interface, the second part is the
Form handler that handles
the data collected through the form, and the third part is the confirmation
page that is sent to the user.
Creating Forms has already been explained
here - Creating
Forms, that's why, now I'm going to show
you how to work with Form input and the confirmation page with the
help of ASP.
Holding Form Input
Forms do a fine job at collecting data, but wouldn't it be nice
if one could actually "hold" such data and use it on an
ASP page called by the form - that is the confirmation page? Variables
to the rescue!
The Form - "form.asp"
First, we'll start off with the HTML that creates the Form interface
<form action="confirmation.asp" method=post>
<input type="text" value="Your name here"
name="Name">
<input type="submit" value="Submit your info"
name="submit">
</form>
When the user clicks on Submit, two pieces of information are sent
to the server: First, the name of the file that the server should
get - confirmation.asp, and second, the data the user typed
into the Form's field(s) - in our example, the field's name is "Name".
what's
next
|