S
sam
Hi,
I have a problem with using CGI module in perl to keep track which
submit button was pressed.
use CGI;
use CGI::Carp qw/fatalsToBrowser/;
$query = new CGI;
if (!$query->param) {
print $query->startform(-target=>'_new');
print "<table border width=100% >\n";
......
print $query->submit(but1);
}
elsif ($query->param(but1)) {
print "param: $query->param(but1),"<br>\n";
}
When I press the submit button "but1", the "elsif" clause does not execute.
Thanks
Sam
I have a problem with using CGI module in perl to keep track which
submit button was pressed.
use CGI;
use CGI::Carp qw/fatalsToBrowser/;
$query = new CGI;
if (!$query->param) {
print $query->startform(-target=>'_new');
print "<table border width=100% >\n";
......
print $query->submit(but1);
}
elsif ($query->param(but1)) {
print "param: $query->param(but1),"<br>\n";
}
When I press the submit button "but1", the "elsif" clause does not execute.
Thanks
Sam