First you should probably use a module to access the submitted form variables. The most common is
. Secondly you need to write code that uses the predetermined list of paramater names. Then you simply loop over them and call the appropiate function. For more detailed help I suggest: