$sql = "DELETE FROM student WHERE student_id IN (". join(",",map {$dbh->quote($_)} $cgi->param('id')). ")"; $sth = $dbh->prepare($sql); $sth->execute() || die $DBI::errstr;