如何在在线考试系统中保存用户的答案? [英] How can I save answers of users in an Online Examination System?

查看:501
本文介绍了如何在在线考试系统中保存用户的答案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在数据库中保存用户的答案?



根据我的可能方法

第一种方式在每次尝试的问题后插入答案

第二种方式在饼干中保存答案



哪种方法可行?





什么是数据库设计来保存答案



ID学生和答案



我用什么来检查问题是否得到回答会话或从数据库值标记?

How can I save the answers of user in database?

Possible methods according to me
1st way insert answer after each attempted question
2nd way Save answers in Cookies

which method is feasible?


And what will be database Design to save answers

ID of student and answers

And what i Use to check whether question is answered or not Session or Flagging from Database values?

推荐答案

如果您想要长期存储,请使用数据库,因为可以删除cookie



假设每个问题都在一个单独的页面上,只需添加到提交事件的数据库。如果是一大页问题,请在完成所有问题并将用户提交答案后将其保存到数据库中。
Use a database if you want long term storage as cookies can be deleted

Assuming that each question is on a separate page, just add to the database on the submit event. If its one big page of questions, save it to the database once all questions are done and the user submits the answers.


这篇关于如何在在线考试系统中保存用户的答案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆