I'm building a survey app (using CakePHP). I have a table called logins that keeps track of every person as they login to take a survey. I do this so that I can control if someone can take the survey more than once or not.
Here, then, is my problem. I want my users to be able to take the survey anonymously, but at the same time group their answers together. Each question answered gets its own row in the database, but I want to keep all the answers from a particular user grouped together. I want to be able to query the database and get all the answers from a particular user, even though I don't know who that user is. I have a field in my answers table called AnonID, but I don't can't figure out how to generate that ID and make sure it is unique. Any ideas?
Thanks in advance!
hydra12