Just like "follow the bouncing ball", I want you to open up Notepad (Yes, Notepad!) and follow me. Copy and paste the following to get started:
<html> <head> <title>Joe's the handsomest guy I know</title> </head> <body> </body> </html>
Save it as form1.html in some folder somewhere. Go ahead and give it its own folder. Start up your browser. Use it to open form1.html and run Notepad and the browser side by side. This way you can create your pages and almost instantaneously see the results of your handiwork.
Type in your form tags.
<html> <head> <title>Joe's the handsomest guy I know</title> </head> <body> <form> </form> </body> </html>
Now, think of a form's purpose as:
For our purposes here, we'll figure that we would like the data emailed back to us neatly formatted. In order to do that, we need to send the data to a CGI script that resides on a server (generically referred to as a form mail script). That script's purpose is to receive the form data, convert it into a neatly formatted email message, then send it to us.
More than likely your web host has a form mail script installed for your use, along with good instructions (hopefully). Look at your host's help pages. If not, and you have the ability to run CGI scripts on your server, you can install your own. As a last resort, there are floating around, free CGI form processors for anyone to use. The following link will lead you to some current CGI form mail resources...
CGI Form Mail Resources
You'll find that such CGI scripts require an action attribute in the form tag along with a method. That action is the URL of the CGI script. Here is an example...
<form action="http://www.yourdomain.com/cgi-bin/mail.pl" method="post">
The instructions that come with your form mail script should tell you what your action URL should be. For the time being, you can pass by this part and continue learning about how to build forms. After you've made a form and found a form mail script to use, you can come back here and concern yourself about the action.
Now, be forewarned... if you've never dealt with a form mail script before it will probably be a little confusing. The first time around, getting it working can be rough going. More head scratching and ways for it to go wrong than you can imagine... but, hang in there, have faith and figure that the fumbling is part of the deal.
|Lessons: Intro 1 2 3 4 5 6 7 8 9 10 11 12 13 Quick Forms Reference|
|HTML 4.0 Reference Barebones HTML Guide|