our approach
|
new tutorials
|
contact us
Perl Basics In Pictures
Basics
Variables
Numbers
Subroutines
Logic & Loops
Files
Create a page called
presidents.html
and save it in the
PERL PRACTICE
folder.
The page should have this code:
<h3>Who were our three greatest presidents?</h3>
<input type=”text” name=”prez1”>
<p>
<input type=”text” name=”prez2”>
<p>
<input type=”text” name=”prez3”>
Create a script that:
-
Requests the names entered in the input boxes on presidents.html.
TIP:
Re-use the subroutine
getFormData
to parse the form data—just cut and paste.
-
Checks to see if the names “George Washington” or “Abraham Lincoln” were input.
-
If either name was input, the script prints out all three names in an HTML table with a gray background.
-
If neither name was input, it prints:
What about George Washington or Abraham Lincoln? Shouldn’t they be in the list?
<< BACK
NEXT >>