Free HTML Forms Class: Lesson 3 – CGI Scripted Forms
Use Ready Made CGIs
Guestbooks
Before you start building your own forms, it’s a good idea to learn the basics with something like a guestbook. They are useful, and if you look at the source code of the HTML you can get a better sense of how forms work.
Set up your form with a Free CGI
Once you’ve installed a Guestbook, you’re ready to return to the form you wrote yesterday. Take the form, and if you used a mailto link at the top, remove it. Then go to one of the many Free CGI sites and find a free form to email CGI to use. A great place to start is with your hosting provider – many provide form to email scripts for their customers.
CGI for Forms
Perl/CGI Script Basics
There are a few things you need to understand about Perl before you put up a CGI. Emmie Lewis the Perl/PHP Guide has an excellent lesson on Perl CGIs. This lesson comes from the Perl 101 course, ignore the homework at the bottom.
Using Forms and CGI
If you have access to Perl on your Web site you should be able to use this CGI. You’ll need to copy it exactly as it’s written – change only the location of Perl on your site and the email address to send the messages to.
Homework
Post Your Answers to the Forum
Put up a form that uses a CGI as the action. This can be as simple as a ready-made guestbook or as complex as a form you wrote yourself. If you want feedback, post your URL to the HTML forum, in the HTML class folder.