dead_passive has asked for the wisdom of the Perl Monks concerning the following question:
The 'if ($cgi->param($paramname) != "")' never gets executed even though just prior to it $cgi-param($paramname) is printed successfully. I am using CGI input elsewhere in the script and it works fine. I really can't see what the problem is here and I would really appreciate some help.if ($cgi->param('Students') eq 'Add') { print "ADDING<br>\n"; for ($i = 1; $i < 6; $i++) { $paramname = "Name" . $i; print $paramname . " = " . $cgi->param($paramname) . "<br>\n"; if ($cgi->param($paramname) != "") { print "GSFDSFDS"; $insertvalue = $cgi->param($paramname); print $insertvalue; #$dbh->do("insert into Students (Name) values ($insertvalu +e)"); #$dbh->disconnect; } }
20040220 Edit by BazB: Changed title from 'Accepting CGI Input'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Which comparative operator should I use?
by Skeeve (Parson) on Feb 19, 2004 at 12:34 UTC | |
|
Re: Which comparative operator should I use?
by Abigail-II (Bishop) on Feb 19, 2004 at 12:38 UTC |