sub update { #!/usr/bin/perl -w use DBI; my ($dbh, $sth, $AccountID, $Input); $AccountID="$FORM{'AccountID'}"; $Input="$FROM{'Input'}"; $dbh = DBI->connect('dbi:mysql:membersdb','member','somepasswd') || die "cannot open"; $sql = qq`UPDATE memberinfo SET Input='$Input' WHERE AccountID='$AccountID'`; $sth = $dbh->prepare($sql) or die "Cannot prepare: " . $dbh->errstr(); $sth->execute() or die "Cannot execute: " . $sth->errstr(); $sth->finish(); }