in reply to passing a variable from a link
The code $q->param{ "animal" }; finds the part of the URL passed to the script that contains the value of the form element "animal".#!/usr/bin/perl -wT use strict; use CGI; my $q = new CGI; $pet = $q->param{ "animal" }; # Instead of # print "Content-type: text/html\n\n"; # use... print $q->header( "text/html" ); print <<STUFF; <html> <head></head> <body> <center> <form><input type="text" value="$pet" size="25"></form> </body> </html> STUFF
|
|---|