I'm making a website (using PHP, JavaScript and MySQL) with a voting system which allows people to vote anonymously but just only once.
It means that my system have to know who voted (because I have to check if the user already voted or not)but I didn't want to store the user name or the user's IP address in the database (ruin the anonymity). I don't know how to get started, I need some guidelines; what should I look for?
Your worst problem is how to make sure your users only vote once, but that's not the point of the question: you are asking how to ensure anonimity
That is rather easy: treat the whatever you use for single-voting as a password, and hash it. So lets say for argument's sake you are using the IP. I'm aware of the problems with that, but lets assume this is your choice.
Mind you, this is about anonimity, not about how to ensure single-voting.