gitarwmn has asked for the wisdom of the Perl Monks concerning the following question:
#!c:/perl/bin/Perl.exe use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use Fcntl qw(:flock :seek); use CGI; use CGI::Cookie; use XML::Simple; use strict; my $passfile = "userfile.txt"; print header; print start_html("New User"); my $q = CGI->new; my $self = $q->url; # the path to this script my $username = $q->param('username') ; my $first = $q->param('first') || ''; my $last = $q->param('last') || ''; my $pass1 = $q->param('pass1') || ''; my $pass2 = $q->param('pass2') || ''; #new user signup page print <<End_of_HTML; </head><body bgcolor="#ffffff"> <form action="http://localhost/newuser.cgi?action=newuser?first?last" +method="post"> <h2>New User Form</h2> First name? <input type="text" name="first" value=""> <br />Last name? <input type="text" name="last" value=""> <br />Username (2-12 characters)? <input type="text" name="username" +value=""> <br />Password <input type="password" name="pass1"> <br />Password (verify) <input type="password" name="pass2"> <input type="hidden" name="action" value="validate_newuser"> <br /> <br /> <input type="submit" value="Go!"> </form> <br /> <br /> <i>Thank you for signing up. </i> End_of_HTML open(FILE, ">>$passfile") or die "can't open password file"; print FILE "$first:$last:$username"; close(FILE);
2006-05-02 Retitled by GrandFather, as per Monastery guidelines
Original title: 'Wondering why this doesn't work'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble getting CGI parameters
by japhy (Canon) on May 01, 2006 at 00:00 UTC | |
|
Re: Trouble getting CGI parameters
by PodMaster (Abbot) on Apr 30, 2006 at 23:15 UTC | |
|
Re: Trouble getting CGI parameters
by GrandFather (Saint) on Apr 30, 2006 at 22:56 UTC |