Question : My html Form is not getting parsed to cgi

My html Form is not getting parsed to cgi

My html is not passing the selectbox to the cgi.  If I change the acct in the cgi to a hardcoded value I get a print out value.  Thoughts?



In the html

<select id ="selectBox" name="acct">


In the cgi

$acct  = "$FORM{'acct'}";
print <<EndHTML;
<body>
Account $acct has been disabled now.
</body></html>


When the above line is printed this is printed, Account has been disabled now

Answer : My html Form is not getting parsed to cgi

The way you have it written, the Perl script doesn't know anything about your form fields.

Here's a quick rewrite of the bulk of your script, which could still use some improvements.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
#!/usr/bin/perl

use strict;
use warnings;
use CGI;

my $cgi = CGI->new;
my %FORM = $cgi->Vars;

my $ht=`hostname`;
#
my $decrypt"XXXXXXXXXXXXXXXXXXXXX"; #### encrypted pwd

my $acct  = $FORM{'acct'};



open my $out_fh, '>>', "/tmp/matt.out" or die "failed to open </tmp/matt.out> $!";
print $out_fh "done with account $FORM{'acct'} or $acct\n";
close $out_fh;
Random Solutions  
 
programming4us programming4us