syntax error at /usr/lib/cgi-bin/addoffice.cgi line 62, near "$sth = $dbh->prepare($stmt) || die ""
Can't find string terminator '"' anywhere before EOF at /usr/lib/cgi-bin/addoffice.cgi line 63.
####
####
# Prepare and execute the SQL query
$sth = $dbh->prepare($stmt)
|| die "prepare: $stmt: $DBI::errstr";
$sth->execute($office) || die
"execute: $stmt: $DBI::errstr";
$sth->bind(undef,/$num);
$sth->fetchrow();
print start_html;
if ($num){ #if a match has been found
$message= "The office of ".$office." is already listed.
";
$url = "http://stgeorges.com/admin/addoffice.html?office=$office&msg=$message";
$q =>print "";
}
else{
# Create the query statement - Insert the new office into the database
$stmt = "INSERT into officers (off_name) values (?)";
# Prepare and execute the SQL query
$sth = $dbh->prepare($stmt) || die "prepare: $stmt: $DBI::errstr";
$sth->execute($office) || die "execute: $stmt: $DBI::errstr";
$sth->fetchrow();
}
print end_html;