sub check_sid { ...    $statement = "DELETE FROM sessions WHERE(id='$sid')"; ...  my $sth = $dbh->prepare("UPDATE sessions SET user_id='$usr_id' WHERE(id='$sid')");  $sth->execute() or die $DBI::errstr; }