This tutorial provides a handy resource for everything you need to know to make and keep cgi scripts running,using PERL, the World's friendliest language.Forms in HTML
Forms in HTML, contain fields whose values are
Most commonly cited usage of these forms is to collect
The structure of the form tag is as follows:
< form Name="first" Method="GET" action="/cgi-bin/xyz.cgi">
The 'Name' attribute of the form is optional and is used
The 'Method' attribute can contain a value of 'GET'
The value of the 'Action' attribute specifies which
The contents inside the < form> and < /form> could
< input type="text" name='anyname' value='ifany'>
which shows up on the browser like this
Password Input :
< input type="password" name='pass' value='ifrequired'>
which shows up like this
< input type="Submit" value='Submit Form'>
which produces an output like this and submits
< input type="reset" Value="Clear">
which produces an output like this and resets / clears
These are the basics you need to know to handle 'forms'
work of the CGI Scripts start once the form elements
The form elements are rendered
in the form of
This module written
by Mr. Steven.E.Brenner is
now see an example, of how the tasks about which
Customer Detail's Collection Form
This is how the HTML form looks at the client side,
< title> Customer details collection form< /title>
< FORM Name="FirstTrial" METHOD="POST"
Enter the Name : < input type="text" name="name">
Enter your age : < input type="text" name="age">
< input type="Submit">
At the server side this data reaches in the following
" name=The+name+you+typed&age=31 "
Notice how the spaces are transformed into '+' Symbols.
1. require "cgi-lib.pl";
Line 1 : Includes the "cgi-lib.pl" module into the perl
Line 2 : Calls the subroutine ' ReadParse '.
Line 3 : The value of the variable 'Name' is stored in the
Line 4 : The value of the variable 'Age' is stored in the
brings us to the end of the