Pass things from a database, through a form, one by one and then store them again? Oh the pain...
If you already have a script that does whatever the processing is, then modifying it to a somewhat less insane approach shouldn't be very hard.
Very down-to-business approach, no finesse:
1) Do something like this to process the query:
while($array = mysql_fetch_array(mysql_query(select blah...)) {
$result[] = $array[0] * 2;
}
2) Store the $result back to the database using foreach.