Jump to content

How do I do a state by state poll?


reagal

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).

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.