# assuming $cgi = new CGI; # prepare update query my $sth = $dbh->prepare(' update pic_table set pic_value=? where pic_i +d=? '); # loop over all param names, and # grep out all those that are numerical foreach my $p( grep /^\d+$/, $cgi->param) { # find the form value my $v = $cgi->param( $p ); # execute the query $sth->execute( $v, $p ); }
In reply to Re: collect all numeric form params and update database
by rhesa
in thread collect all numeric form params and update database
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |