Could someone help me. I'm new to CGI. I encoded the following code and got an error message which i don't know how to fix it.
#!/usr/bin/perl print "Content-type:text/html\n\n"; use DBI; use CGI; $query = new CGI; my $dbh=DBI->connect('DBI:mysql:test','edward','password'); my $logname=$query->param('log'); my $passwd=$query->param('pass'); my $sth=$dbh->prepare(<<End_SQL); SELECT * from login where log = "$logname" End_SQL $sth->execute(); @row=$sth->fetchrow_array; $dbh->disconnect(); print <"TESTING</br>">; print "</body></html>";
when i try to check this using the "./new.response.cgi" command, i get the following error.
Content-type:text/html DBI::db=HASH(0x81dc3e0)->disconnect invalidates 1 active statement han +dle (eithe r destroy statement handles or call finish on them before disconnectin +g) at ./new.response.cgi line 22.
Hope u could help me.
In reply to DBI Error by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |