<form> HTML element
Before you can start building the back of the subscription card, you have to look
at the front side. First, you need to specify the address to which you’re
sending the information. We do this with the <form> element,
whose model is shown below:
<form action="script" method=["get"|"post"]>
<!-- form contents go here -->
</form>
The action= attribute specifies a
script, which is the “destination address.”
It’s
the name of a program on the server that
will handle the information you’re sending. This script is usually
written in some programming language like Java or Perl. We’ll leave
that task to some programmer. Usually it will reside in a special directory,
often with the name cgi-bin.
The method= attribute tells how you want your message sent.
Sometimes your webmaster or programmer will tell you that you must use
"get" or "post". In the absence of any explicit
instructions, we recommend that you use method="post". If you’re
really interested in knowing the difference,
here’s a fairly lengthy explanation.
And here’s a specific example of a <form> tag. It will send
the data (once it is all organized) to a script named
subscribe.cgi via the post method:
<form action="cgi-bin/subscribe.cgi" method="post">
<!-- form contents go here -->
</form>