I'm trying to insert all the input fields of a form into a database, a seemingly simple procedure that I've again somehow made unnecessarily complicated. The gist of it is this (i.e. it's actually hundreds of lines of code but I'm 100% certain everything up until the array part ...