Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Basic Voting System

Status
Not open for further replies.
Dec 24, 2001
857
GB
I want to create a basic voting system on my flash site where the user chooses either 'Yes' or 'No'. This is then stored somewhere so that they can view a statistics page where it'll say how many Yes's and No's theres been.
Also, I want them to only be able to vote once. Some ideas I had are:

* Have each button write something into a text file, e.g. Click on 'Yes' and '1' is added to yes.txt . Can flash then work out how many lines have been filled in and display something like "Yes = 10 votes"?
* Create a cookie or something after voting, and if this cookie is detected, they can't vote again?

If you need any more info, let me know.

Thanks
 

as for storing the number of votes, you need server side scripting to create the txt file such as ASP, PHP or JSP. Flash alone cannot do that. All flash can do is send which was voted.

the cookie idea is good to ensure that they can vote only once, unless they clean thier cache. another alternative is to get their IP address.


biggie.
 
Can Flash not add to and read from a text file?

I really new to all this web design stuff, so how do I create a cookie or get their IP address? The cookie idea sounds like the best to me because it only has to be basic.

Rgds
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top