Currently I have a form that asks the user a series of questions, they answers those questions via a select tag object. Those options in the select tag are populated by a database via php and mySQL. If the user does not see an option that best fits the their answer, they are allowed to add in their own answer. They are then brought to a new page to register their new answer to the question. That form posts to a php script that then updates the data base and they are back to the original form with the questions with the newly added option now in the select tag. How would I go about making the newly added answer selected in the select tag after they are redirected? I have researched this idea and cant seem to find a answer. So im looking to bounce some ideas around if someone has one.
Are you pushing the new answers to the same database that you are pulling the options from in the first place?
What I would recommend doing is getting the last inserted ID from the database and storing it in the users session, and then using that to automatically have the answer they just inserted selected by default.