Building A Poll
How do you go about creating a poll using PHP and My SQL?
I don't really have a clue where to start,
Create a table called 'Polls'
12 colums, ID, Question, and 10 Options?
How do you create it so it counts the clicks each one has recieved, or show percentages etc etc?
But what I was actually looking for was:
On a forum, if a user wants to create a poll about something, then they can do, just like posting a reply or a thread about something
You would have a seperate table with the polls in, if the user wants a poll you would add a new line to this table, then use mysql_insert_id(); to retrive the ID and store that in your threads table under a "polls" feild.
When the user veiws it you would grab the poll feild, if it's zero, then the user doesn't want a poll, otherwise retrive it and display acordingly.
Voting is a simple matter of an update query.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)