TM3909 Posted May 7, 2008 Share Posted May 7, 2008 Hey all, Brand new to the forums and need some serious help. I'm currently designing a website where a user fills out a form to post information (Name, rank, serial number; Basically a Comment system). I am in need of a poll system that will sit under each comment, allowing users to vote "Hey that was good" or "no that sucks!" type of thing. I can code a simple poll, but its the same poll for all the entries. I've yet to figure out how to make the poll unique for each comment. Any help would really be appreciated! Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/ Share on other sites More sharing options...
DarkWater Posted May 7, 2008 Share Posted May 7, 2008 Store the comment ID in with the poll data. Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535266 Share on other sites More sharing options...
TM3909 Posted May 7, 2008 Author Share Posted May 7, 2008 How would the code look for that? Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535268 Share on other sites More sharing options...
DarkWater Posted May 7, 2008 Share Posted May 7, 2008 Show me the database schema for the polls. Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535269 Share on other sites More sharing options...
TM3909 Posted May 7, 2008 Author Share Posted May 7, 2008 I've set it up like this: ID Yes No IP Address But I was just experimenting, I plan to change it. What if I put the vote in the same table as the comment? Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535271 Share on other sites More sharing options...
TM3909 Posted May 7, 2008 Author Share Posted May 7, 2008 Look, basically its a "Was this comment useful" vote system, like you see on Amazon/Apple etc etc, any of the stores that provide comments on products. I just need the ability to have a new unique poll created every time someone fills out the form. Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535275 Share on other sites More sharing options...
947740 Posted May 7, 2008 Share Posted May 7, 2008 Just insert the user's IP into the table. Whenever someone votes, check to see if their IP is the same as one in the table. However, some AOL users may be able to vote again, due to changes in IP. Also, if someone uses a proxy or something like that, they would be able to vote again. I know that is not the real issue, but I figured I would bring it to your attention. Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535282 Share on other sites More sharing options...
TM3909 Posted May 7, 2008 Author Share Posted May 7, 2008 http://www.crunchgear.com/2007/10/27/leopard-on-a-pc/ To make it really simple, Look at the comments on this page. "Was this comment useful?" - I need that system. That site is using some type of service, but all I need is to build that feature. lol I'm a complete noob at this, forgive my complete confusion. Link to comment https://forums.phpfreaks.com/topic/104567-unique-poll-help/#findComment-535287 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.