How to start it
Once again, this is similar to JavaScript. Here's what you do to
make it work:
-
In the <FORM> tag, set the NAME attribute to whatever
you want, and ACTION to the URL of the Perl script.
-
For the METHOD attribute, you can use either POST or
GET, but I use POST exclusively.
-
GET puts the data in the URL and has a maximum character limit.
It is also easier to hack.
-
POST puts the data in a variable that can be read by your Perl
script.
As in JavaScript, whatever you name the individual INPUT tags
is what you will use to refer to them.
Example:
<FORM NAME="dataForm" METHOD="POST" ACTION="parsedata.pl" onSubmit="validate()">
Your first name:
<INPUT TYPE="TEXT" NAME="firstName">
<INPUT TYPE="SUBMIT">
</FORM>
Where:
dataForm is the form name,
POST is the method,
parsedata.pl is the Perl script that will be executed when the user submits
the form, and
validate() is a JavaScript script that is called when the user attempts
to submit the form.
Use the tags we discussed in JavaScript.
Additionally, to store data from one form to another, you can use <INPUT
TYPE=HIDDEN VALUE="hiddenValue">, where hiddenValue is the value to
store. If you need to use this type, ask me for help.
Reading data into your Perl script
Home