0% found this document useful (0 votes)
17 views

Copy Installed Here: Making The Form Talk Back

The document describes adding functionality to a basic CGI script by having it return form submission data. It provides HTML code for a simple form asking for a favorite color. When submitted, the CGI script will return the color entered along with the form field name, providing a basic demonstration of a form interacting with a server-side script.

Uploaded by

pankajsharma2k3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Copy Installed Here: Making The Form Talk Back

The document describes adding functionality to a basic CGI script by having it return form submission data. It provides HTML code for a simple form asking for a favorite color. When submitted, the CGI script will return the color entered along with the form field name, providing a basic demonstration of a form interacting with a server-side script.

Uploaded by

pankajsharma2k3
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Making the Form Talk Back

At this point, you should have a working copy of backatcha.cgi spitting out blank pages from a Web server. Let's make it actually tell us something. Take the following HTML code and put it in a file:
<FORM ACTION="putyourURLhere" METHOD=GET> <P>What is your favorite color? <INPUT NAME="favcolor"></P> <INPUT TYPE=submit VALUE="Send form"> lt;/FORM>

Be sure to replace putyourURLhere with the actual URL of your copy of backatcha.cgi! If you want, you can use the copy installed here at Perl.com. This is a simple form. It will show a text box where you can enter your favorite color and a "submit" button that sends your information to the server. Load this form in your browser and submit a favorite color. You should see this returned from the server:
favcolor: green

You might also like