Hi all,
I snatched this guest book off some script site and it's either gone now,
or I misplaced the bookmark, but anyhow, perhaps someone can help me with
the syntax. Something I changed at 3AM one morning now it doesn't work
right, I know the MySQL parameters are fine, it's something I accidently
deleted in here.
$success returns this value: DBI::st=HASH(0x81a8280) at the line
if($success != 1) ...
can anyone point out my obvious mistake?
sub insert_entry {
my ($dbh, $success, $name, $email, $website, $comments,$time);
$dbh = DBI->connect("DBI:mysql:database=$serverDb;
host=$serverName;port=$serverPort",$serverUser,$serverPass);
$name = param("name");
$email = param("email");
$website = param("website");
$comments = param("comments");
$time = time;
$SQL = "INSERT INTO $serverTabl(name,email,website,comments,time)
VALUES(?, ?, ?, ?, ?)", undef, $name,
$email,$website,$comments,$time;
$success = $dbh->prepare($SQL);
$success->execute;
$dbh->disconnect;
if($success != 1) {
return "$success Sorry, the database was unable to add your entry.
Please try again later."
} else {
return;
}
}
Thanks.
Scott.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]