- or download this
sub writeElems {
my ($tbl, $prm, $dbh) = (shift, shift, shift);
...
if (%valid) { $dbh->do(insertstr($tbl, %valid)); } #Creates and ex
+ecs the statement
return %valid;
}
- or download this
# A sub to take CGI parameters, untaint and validate them.
# Returns: a hash with ready-to-insert data,
...
}
return %retval;
}
- or download this
# Prepares the insert statement string, using results of preinsert.
sub insertstr {
...
chop($str); print STDERR "$str\n";
return $str.";";
}
- or download this
if (scalar($page->param) > 1) {
$Xtable = getXTableName($mtype, $dbh);
...
$page->delete('items.media_type');
}