Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-21-2004, 10:00 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Help With Polls IN PHP

I just cannot understand polls! I didn't even know they required cookies! Lol so if someone could could they write me a small example script to look over and learnfrom. If it takes to much time don't bother. Thanks In Advance .
Reply With Quote
  #2  
Old 08-21-2004, 01:43 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

You dont need to use cookies, but its a good thing if you want people only to be able to vote one time

Can be done using IPs but its not as good as cookies.
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #3  
Old 08-21-2004, 05:13 PM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

simple squad site has a poll....
Reply With Quote
  #4  
Old 08-21-2004, 10:53 PM
prey is offline prey
Registered User

Join Date: Mar 2004
Posts: 119

Send a message via ICQ to prey
Quote:
Can be done using IPs but its not as good as cookies.
not as good as cookies?

if you cookie a voter. all he has to do is delete that cookie and vote again.


either way for a poll. you could use
- a table with the items
- a table for IPs of people who voted
- a script to increment vote count in the Items table each time an item is voted for.
it also needs to check if the IP is not in the IPs table before incrementing the vote count

goodluck
__________________
http://addf.net
http://som.addf.net
http://snmservers.com
http://snmfuturedomination.com
-------------------------------------
but there it's a different movie
she stares into the screen
and fantasies enter her
harder than all those who will get to know her
Reply With Quote
  #5  
Old 08-23-2004, 03:43 PM
SilentTrigger is offline SilentTrigger
-1PARA-

Join Date: Sep 2002
Location: Sweden
Posts: 3,972

Ever heard of dynamic ip and proxy servers?
__________________
-1PARA-AlexKall

My photography website



Reply With Quote
  #6  
Old 08-23-2004, 04:57 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Use both. If they have a proxy (Like alot of AOL users) there ip changes alot even if they don't re-connect. And cookies, we'll all they have to do is delete them.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #7  
Old 08-23-2004, 10:35 PM
prey is offline prey
Registered User

Join Date: Mar 2004
Posts: 119

Send a message via ICQ to prey
a lot of proxies reveal that they're a proxy. e.g yahoo will not allow you to use it if you're behind a proxy.

and well 56k users nothing you can do. but if the poll has a lot of votes reconnecting a 100 times is somewhat a dumbass idea. especially if you do put data into a cookie and record the IP.

the best way would be to allow only registered users vote. and have a user_poll table recording which poll a user voted for. cant get around that easily. but that's not really a public poll

my point being putting poll data into a cookie is not better than recording the IP of the voter
__________________
http://addf.net
http://som.addf.net
http://snmservers.com
http://snmfuturedomination.com
-------------------------------------
but there it's a different movie
she stares into the screen
and fantasies enter her
harder than all those who will get to know her
Reply With Quote
  #8  
Old 08-23-2004, 10:52 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

what does novahq.net do?
Reply With Quote
  #9  
Old 08-24-2004, 01:50 AM
prey is offline prey
Registered User

Join Date: Mar 2004
Posts: 119

Send a message via ICQ to prey
cant you test it yourself?
__________________
http://addf.net
http://som.addf.net
http://snmservers.com
http://snmfuturedomination.com
-------------------------------------
but there it's a different movie
she stares into the screen
and fantasies enter her
harder than all those who will get to know her
Reply With Quote
  #10  
Old 08-24-2004, 04:22 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

which one, cookies or put i.p.'s in mysql?
Reply With Quote
  #11  
Old 08-24-2004, 11:03 PM
prey is offline prey
Registered User

Join Date: Mar 2004
Posts: 119

Send a message via ICQ to prey
just vote. clear cookies and vote again. if it wont let you then use a proxy and vote again.99.9% you 'll be able to do it.
__________________
http://addf.net
http://som.addf.net
http://snmservers.com
http://snmfuturedomination.com
-------------------------------------
but there it's a different movie
she stares into the screen
and fantasies enter her
harder than all those who will get to know her
Reply With Quote
  #12  
Old 08-25-2004, 03:51 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

see i can test it. I'm going to do both for my polls, and make it only in members only vote thing . Only 1 vote will now be guarnteed .
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Polls and registration DevilDog#1 Feedback / Novahq.net Support 1 05-25-2005 04:42 PM
polls XinG phphq.Net Forums 6 11-02-2004 05:42 PM
Polls zza1pqx Feedback / Novahq.net Support 3 04-30-2003 02:13 PM
polls??? Se7eN Web design and Programming 5 04-28-2002 05:14 PM


All times are GMT -5. The time now is 08:35 AM.




Powered by vBulletin®