I have a form with few fields. Now on clicking a button "save as draft", the ajax call will go and the poplulated fields will be stored in the database.
But when the user clicks on "save as draft" again, then this time the previous field should be updated and not a new field be created.
So I thought some remedy
-. Making a hidden field and load it with unique number when the page is loaded and also store it in SESSION variable.
And after comparing the unique number with the session variable, if the number is same then update the field in sql or else create a new field in sql.
Is the above solution ok or people use different one?