All the form fields that have been passed from the form are in $HTTP_POST_FIELDS or $HTTP_GET_FIELDS (depending on your form's method). It's an associative array of the type $HTTP_POST_FIELDS['form_field_name']='form field value';
So a foreach($HTTP_POST_FIELDS as $name=>$value) loop should be enough to get you going.