I am blind. Why do I get server errors?$dbh = DBI->connect ($dsn, $user_name, $password, { RaiseError => 1 }) +; $query = "SELECT nw_ucountry FROM $Table"; $query .= " WHERE nw_ucountry LIKE '$country'"; $sth = $dbh->prepare($query); $sth->execute; while (($qcountry) = $sth->fetchrow_array()) { unless ($country =~ /$qcountry/i) { my $mdate = `date +'%Y-%m-%d'`; my $mtime = `date +'%H:%M:%S'`; $rows = $dbh->do("INSERT INTO $Table VALUES('','$country', +'$passwd1','$email','$fname','$lname','$mdate','$mtime','')"); &header("We are done"); print "We're done.\n"; &footer(); } else { &header("Duplicate Country Name"); print "<h3>You have selected $country for your country.</h +3><p>\n"; print "<h4>It already exists in our database.</h4>\n"; print "<hr>\n"; &footer(); } } $sth->finish(); $dbh->disconnect(); exit(0);
Thanks.
In reply to MySQL and PERL tribulations.... by bman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |