in reply to inserting all form fields into db

Maybe you can look at Class::DBI, once you get your parameters as a hash, you can simply call the "create" method, passing a reference to the hash. It will insert for you, you don't even need to construct the sql.