First, create a database to store quiz questions, answers, and unique codes. Generate a unique code for each user when they start the quiz and save it in the database. When the user submits their answers, check the code to ensure it is valid and then delete it from the database. Save the user's answers along with the code in a report. Later, you can export these reports for review. This ensures each code is used only once and keeps track of all quiz submissions.