<%init> # Process a set of checkboxes. use DBI; our $dbh=$m->comp('mysql-connect-st.mas'); # Process submitted data. my $a=$ARGS{st_id}; # Array reference. my @array=(); # If only one item is returned, then force it into an array. if(!($a=~/ARRAY/)){ # it's a scalar push(@array,$a); $a=\@array; } if(($a ne "")) { # Update the deleted flag for the given records. foreach my $x (@{$a}){ my $sql="update st_defs set deleted=1 where id=?"; my $sth=$dbh->prepare($sql); my $result=$sth->execute($x); } } $m->redirect('view-simulation-test-definitions.html');