How do I prevent a customer from rating a product more than once? Is it best to use cookies that store the IP address or is it best to store user ratings in the database? I am using MySQL and ColdFusion.
Cheers!
If you have user accounts, associate your ratings with the accounts. Job done as long as one user only has one account.
If you use cookies then you will likely run into problems with users who have them disabled, who use multiple browsers or who deliberately delete them, if you store the IP address you will potentially ( although it is quite unusual ) run into problems with different users from the same IP address- the same family or organisation will probably have relatively few external IP addresses, while ISPs such as AOL will routinely have requests for a single page come from multiple IPs.
On the whole my feeling is that if a user cares enough to rate a product they probably care enough to sign up for a user account. You can still keep an eye on IP data and other browser information in case anything dodgy is going on, but that is the most effective way to ensure that your users are at least distinct enough to have different email addresses. It won't catch anyone wanting to seriously manipulate your ratings, but actually if you do run into someone like that you will have a hard time stopping them whatever you do and until you have indicative useage patterns you'll be hard pressed to know what to look for. In this instance making sure that whatever you do, you keep careful logs is important...