MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 22nd, 2003, 10:37 PM
m0digital m0digital is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 m0digital User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Poll with ASP and MySQL

Hello,
I'm writing a poll in ASP that stores info in MySQL. The mysql db stores all the polls and and votes for each user.

I'm a little hesitant on using cookies to store whether the user has voted or not on the user end.

What would be the best way to store whether a user has voted for a certain poll? Using cookies? or using a server side mysql table that the poll checks the IP against everytime. If i do the table of IP's then there comes the issues of multiple users at the same IP.

So I'm at a loss. if i am to use cookies, how would i go about stores the values of all the tables in a single cookie? or multiple cookies?

thanks a lot!

Reply With Quote
  #2  
Old April 23rd, 2003, 03:23 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
If you're just going to have a new poll every week - use cookies. They're a cinch to program, and you'd just set the expiry date on the cookie to the start of the next week (or whenever your new poll is posted).
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old April 23rd, 2003, 05:32 PM
m0digital m0digital is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 m0digital User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
New poll every week but the old polls are still available for your to vote on. I've got an idea to store a single cookie that has a string w/ all the voted polls. Then each time the user visits, the server checks the cookie and parses the line to see which ones have been voted and then replaces that cookie w/ a new one.

Reply With Quote
  #4  
Old April 23rd, 2003, 06:44 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Yup - that'd work too.

Or, you could store the users ID in the cookie, and store which polls they've voted for in the DB

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Poll with ASP and MySQL


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway