Well, this line won't work:
while(list($value, $variable) = $HTTP_POST_VARS) {
You mean each($HTTP_POST_VARS).
Now I'm not too sure what you mean by "split the variables out of HTTP_POST_VARS two at a time" - and into what? An array? Two arrays? An array of two-element arrays?
Two arrays is easy: rename the form fields to value[1], value[2], ... etc, and then $HTTP_POST_VARS['value'] will automatically be an array of the value fields' contents.