Hi
I’m working on quiz type of game where a user can invite another user to play the game – I have 10 questions that are picked randomly for each game session from a database. What I need to do is generate a link that has the same questions for both users.
As far I thought of creating table with session id, both usernames, an array (questions and possible answers), and two fields for answers sets for comparison.
I know storing an array in one field is not a good practice however I need to pass it to my JavaScript code for both users and they need to be the same – so I cannot fetch the same questions for those users using the same query. I would use serialize() and unserialize() functions to achieve that.
I’m wondering if there might be a more efficient way of handling this.
Thanks a lot for any advice.