# sample source from html
Row 1: Megan, Column 2: F, Column 3: 1
Row 2: Joseph, Column 2: M, Column 3: 2
Row 3: Kyle, Column 2: M, Column 3: 3
Row 4: Katie, Column 2: F, Column 3: 4
Row 5: Abby, Column 2: F, Column 3: 5
# perl code to delete checked values my $dbh = DBI->connect("DBI:${dbtype}:${dbname}", "$dbuser", "$dbpass") || die $DBI::errstr; my ($sql, $sth) = ''; # Remove checked values # This is the part of the code that I'm seeking advice on... foreach ($cgi->param('id')) { # name of table is student $sql = "DELETE FROM student WHERE (student_id = $_)"; $sth = $dbh->prepare($sql); $sth->execute() || die $DBI::errstr; } # prints updated table $sql = "SELECT * FROM student"; $sth = $dbh->prepare($sql); $sth->execute() || die $DBI::errstr; # show() is a subroutine that outputs the updated table in html format show();