|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
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).
|
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Poll with ASP and MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|