Saving of submission to database