dannyb785 Posted June 22, 2008 Share Posted June 22, 2008 Hi all, I'm building a site for a client and I have a poll feature that they can include on pages. The way I have it set up right now is that when a user(always anonymous) makes a vote on a poll, the current session is recorded to have voted for that poll, so that it won't show up again if the page is viewed(so that they cant vote more than once). However, if the user exits the window, they can easily open a new one and go to the page and vote again(I dont want this). I would like to make it instead where the user's ip address is recorded so a user can't vote twice in the same day. Problem is, since most user's coming to this site are college students, most of the time they will be using the university's wireless and therefore would all have the same ip address. Is there any other way to uniquely identify a visitor that way even if 2 are visiting with the same ip, that they can be differentiated? Quote Link to comment Share on other sites More sharing options...
peranha Posted June 22, 2008 Share Posted June 22, 2008 could you set a cookie on the users computer, and check to see if that cookie is there. Not use a session, but a plain old cookie? Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted June 22, 2008 Author Share Posted June 22, 2008 ah ha. You know, in all the time I've worked with php(about a year and a half) I've never worked with cookies. Looks like I'm gonna have to! I'll look into it, but if anyone else has other ideas, please let me know. But thanks for that! That's probably what I'm gonna need to do. Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted June 23, 2008 Author Share Posted June 23, 2008 This fixed the problem. Everything works fine! Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.