I was wondering about the best way to setup to following.
I have a dynamic form that can potentially get very long once a user has finished adding their data. What I was hoping to setup is a background process that saves the data they have to the database.
What I had setup was a settimer function that would check if a question is in a saved state and if not add it to a list of questions to save. Then it would trigger an ajax call which uses php to post to my database. The first time this happens the ajax will return the id of the submission so the form knows where to post these to.
The second time the set timer function is run it passes this id.
My biggest problem is I don't want the user to know table ids. I was just thinking someone can mess with the javascript and submit their results to other ids pretty easily.
I was just wondering if there is a better way to achieve this? Or even some examples?
Thanks