Jump to content

Recommended Posts

I searched on the forum but haven't found anything. Also forgive me if this is in the wrong section. I am looking to create a website where I ask questions and get poll results tallied by all 50 states in the US. Similar to the way ESPN does their polls.

 

http://sports.espn.go.com/espn/fp/flashPollResultsState?sportIndex=nba&pollId=67170

 

based of off this map or a similar one

 

http://espn.go.com/pollmap/swf/pollmap09.swf

 

or, in the absence of the pretty flash graphics, maybe just a bar graph chart or list.

 

So for example say the question is "Do you think we should go to war with Iran?"

-Yes

-No

-Undecided

 

and display the results by state (for example)

AL - 60% yes 30% no 10% undecided

AK - 75% yes 25% no 0% undecided

etc

 

Is this done through scripting in flash or am I looking for software? I'm pretty new to this as you can probably tell. Just need to know which direction I should be looking towards for the solution to this. Any help would be greatly appreciated, thanks!

Link to comment
https://forums.phpfreaks.com/topic/143807-how-do-i-do-a-state-by-state-poll/
Share on other sites

It can all be done in what ever language you can work with (matter of opinion) may not look as nice as the next one but will work to the same similar extent.

 

Now ill be honest, I didnt goto the refrence link you gave but, the by state factor is an easy concept per say. You store your info in a DB i assume so you make a row for every state then take a count that way by state. Heres the thing though. You can either as the user to specify the state when submitting the poll or you can have it figure it out on its own, the on the own thing though gets tricky theres ways to work it but generally from what I know atleast which could be wrong, is there is something called "GEO IP" or something to the affect, where you can with PHP determin the state via the IP. (Which is probally whats going on behind the Flash mentioned on your refrence link, the flash is doing its thing but chances are its using php/ajax or javascript alone to do that stuff).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.