Save quiz results to database and display after quiz ends successfully