hwg-techniques archives | Dec 2001 | new search | results | previous | next |
Re: perl scriptby "Ryan Fischer" <ryan(at)gigabee.com> |
|
You wrote: > I'm trying to run the following test form and corresponding perl > script. Everything shows but the variable "name". Can anyone see > why this is? > > Kevin Riggs > > <HTML> > > <HEAD> > > <TITLE>Test form</TITLE> > > </HEAD> > > <BODY> > > <FORM METHOD="post" ACTION="cgi-bin/form.pl"> > > Name:<INPUT TYPE="text" NAME="name"> > > <br> > > <INPUT TYPE="submit" VALUE="click here"> > </FORM> > > </BODY> > > </HTML> > > > and the perl script: > > #!/usr/bin/perl > > > use CGI; > > my $handler; > $handler = CGI::new(); > > print $handler->header(); > print $handler->start_html( > -title=>"form results\n", > -bgcolor=>"#ffff00"); > print "Name: $name"; This should be: print "Name: " $handler->param('name'); If you want to parse all variables in to simple ones, something like this should work: for(qw/name/){ ${$_} = $handler->param($_); } HTH! :) -- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA