I have a got a HTML form. It has multiple fields. The data should be inserted into the database using DBI. I'd like to use placeholders in the query. They aren't all required fields.
I was wondering if I could use your method for dynamically inserting values into the database, or should I just insert everything after initialising in the general form $fieldname = $cgi->param('fieldname') || null;?