Adding and updating data to the database using the column names sent by POST

You were already told not to do that -

And what to do -

By laying out a table like a spreadsheet, every operation to find, order, count, insert, and update data requires more code and more complicated queries.