in reply to Variable from a variable: the dark side?

You don't need to have your variables named that way. What's wrong with @type and $type[$query->param('type')]?

To be honest, I think your design is likely to be amiss. See if you can't construct a more compact and coherent use of the form data.

After Compline,
Zaxo