I'm trying to write a reusable function to add/update/delete records from a dataset.
I've got about 7 functions that are all copied from the first one I wrote, and they all pretty much contain the same code with the exception of the form fields, db fields, and database tables.
I'm trying to make it so that I can detect what type of transaction is needed, get the correct fields declared, build a SQL and process.
Here's the problem...
I'm calling a routine called fm_lib::do_add which is my add routine processor. Inside there, it needs to be intelligent enough to detect that I'm working with the contact_us function, get the form data, build a query, and process the form properly.
I have 4 parts to the routine - form validation, SQL assembly, SQL execution, do_confirm (a confirmation message)
I'm having problems with the getting the proper form variables from the post to build the SQL.
Any ideas?