someone had the same question in the coding forum (I think) today.
anyway, you don't have to uniquely name the form elements.
You can name them like this name=formvar[] and they will show up in an array.
However, I prefer unique names too.
I prefer to name them according to fields in my database.
I get the names of the fields, and then print out a form using those names. You need to do some special handling, if you care about what kind of input it is.
Once I have that, I get my fields list from the database, and I use them as keys into the HTTP_POST_VARS array.
Loop through it to build your select query.
I like to build an array I call $WHERECLAUSES which are indexed by the fieldname that end up like $WHERECLAUSES[$key] = "" . $key . $" = '" . $myForm[$key] . "'";
THen I explode it and concatenate it onto the first part of SELECT .....
Also, when you are going through the loop to get the values from the HTTP_POST_VARS, you may need to have special handling.
You do this by making a list of keys that need the special handling.When your looping, you see if the current key is in the special keys list, and if it is you do what you need to do.
If this wasn't specific enough, post some code and I'll help you sort it out.
Feel free to email me.