KAL

Lab #2

Web Page Forms

In this lab, we will learn how to create Forms that allow reader input on our Web pages. First let's learn a bit about CGI because it is a cgi-script that executes when the information typed into a Form is submitted.

Because a later lab will teach about cgi-scripts, your form will execute a Perl Script prewritten by me that processes the form when the submit button is pressed.

We'll create a form that's a guestbook that users can use when they visit your page.

  1. Get the HTML source for your guestbook and change it to say what you'd like. Leave the kal@cs.wpi.edu for now.

  2. Change the permissions on it as usual.

  3. Now access this page with your browser.

  4. If everything worked, a message was sent to me. Now let's change the guestbook form to send mail to you when the Submit button is clicked. You'll begin this by changing the address kal@cs.wpi.edu (there are two of them) to your email address.

  5. Now you'll have to go into the cgi-bin directory (I'll tell you the address), and copy .../kal/guest.pl to your cgi-bin account. Edit this appropriately. Then change the address of this file in your EDguest.html - where you find the reference to "guest.pl". Don't forget to replace "/kal/" with your cgi-bin user name.

  6. Check out your guestbook with your browser.

    More about cgi

    Michael Grobe on Forms and CGI Scripts

    John McCrorey's Summer 1997 project


    Send questions and comments to: Karen Lemone

    What do these buttons mean?