oops.

that should have been

reset($_POST['products_id'])

before the line

while ( list( $key, $val ) = each($_POST['products_id']) ) {


apologies