I'm wondering if there is any easier way to write the script I want to make.
I am trying to update all the fields in my database with the fields I have on my form for the system settings.
My database structure is: ID settingName Value
I have a function that updates the database for me on the call of
$opt->update_option('optionName', 'value');
Is there a way to specify during the POST what the corresponding optionName to the value would be so I could then run it through a foreach loop and not have to manually write the update_option for every form value?
I.e when the form is posted it sends something like: SiteName:Stackoverflow so I can then run a for loop to split on the delimiter of :
And execute the database update?
Thanks for any input!