The declaration of $db is too low. The variable is being declared in an if check and it's being referenced in an outer scope. Declare $db higher up in a block where it's visible to both the case where you assign it and where you reference it. The outer scope would work, that's where you've defined the $cgi variable.
Hazah! I'm Employed!
In reply to Re^6: Perl CGI and SQL statements
by osunderdog
in thread Perl CGI and SQL statements
by kjg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |