Preventing multiple votes on a survey?

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   re: Preventing multiple votes on a survey?
Kilim
CZ Newbie
Kilim has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Dec 06, 2004
0.00 posts per day
Posts: 15
Points: 1,581
   
Ok.
That worked.

I also just replaced the 1 & 0 in that code and get it to get random polls as well.
But if I set it up to not be random I have to switch the numbers back to the original form.
Just made it this way so it will be easy for me to change when I decide to make a non-random poll one day.
if ($make_random == 0) {
$result = $db->sql_query("SELECT pollID, pollTitle, voters FROM ".$prefix."_poll_desc $querylang ORDER BY rand() LIMIT 1");
} elseif ($make_random == 1) {

and change it to:
if ($make_random == 1) {
$result = $db->sql_query("SELECT pollID, pollTitle, voters FROM ".$prefix."_poll_desc $querylang ORDER BY rand() LIMIT 1");
} elseif ($make_random == 0) {

Unsure why its not working right for me.
I don't have articles linked to the polls as I am using FNA mod.

Also, the voting fix seems to be working.
But if I go to a different PC and try to vote on a same poll I can vote 1 xtra time in it still.
But after that I cant vote anymore like its intended.


Back to top Reply with quote
#2   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I created a block to pull surveys from the forums and display them. You can download it from the link below , as I just submitted it to Codezwiz downloads and it isn't active yet.
[ Register or login to view links on this board. ]



Back to top Reply with quote
#3   re: Preventing multiple votes on a survey?
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
It's active now and ty for the contribution



Back to top Reply with quote
#4   
n3wD
CZ Newbie
n3wD has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Sep 21, 2004
0.00 posts per day
Posts: 6
Points: 1,108
   


Originally posted by Telli @ Tue Dec 07, 2004 8:54 am:

Please try this block for me...


The new block you posted works great. Thanks alot. icon_mrgreen.gif



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum