Hey,
I was wondering the best approach to organizing my MyQL tables.
I have a Questions table that contains a primary question_id and a question field which is a varchar to store the question.
Then, I have an Answers table that has a primary answer_id, a question_id to connect it to a question, and then an answer varchar for the answer.
What I am wondering, is it safe to simply use a boolean field to say whether the answer is correct or not? Or, is this somehow unsecure where a person could potentially EASILY access the answers.
Another solution I was thinking was to have, in the Questions table, a correct_answer field that would contain an encrypted value. This encrypted value would be either the answer or answer_id of the correct answer. Every time a person answers, then it would encrypt their answer and check it by comparing it to the encrypted value in the database.
This way, the only way a person could guess the answer was if they knew my encryption.
Does this make sense? Let me know if I explained it okay, and I would appreciate any insight!
Thanks