I wrote a php program that shows a poll and people have to vote for it
theres a table in my mysql database for polls:
pollquestion column will contain the question of the poll
polloptions will contain all the options for the poll (divided by the sign |)
pollvotes will contain the numbers of the votes of each option respectively..
For example, if the polloptions contained: Option 1 | Option 2 | Option 3
and pollvotes contained: 3 | 50 | 6
that means that the Option 1 got 3 votes, and the Option 2 got 50 votes, and the Option 3 got 6 votes and so on...
pollvoters column will contain the names of the voters; each time a user votes his name will be inserted in the column using the concat function..
voterschoices column will contain the choices of the voters.. each choice will be represented by its Order number (Option 1 will have num 1, Option 3 will have num 3...)
Now how can I write a php code to show what each user has voted?
I wrote a code to do it but it was very bad because it shows a list of users and in front of them it shows their choices.. I want the program to show options and the choices of the users for each option.. for example:
Option 1: John, Selim, Khaled, etc.. (Where these are the names of voters).
Thanks in advance.