dontiri
Newbie
Joined: 16/10/2005 04:26:49
Messages: 1
Offline
|
Hi, im new to php and im requred to do this project. its on online voting.
this is how its suppose to work. a voter must properly logged in and cast his/her vote. now to vote, he/she has give preferences to the candidate; that is, if there are candidates A,B,C,D and let say this is the voters' preferences for the candidate; A=2, B=1, C=4, D=3.
Now a voter must not put the same preference number twice for 2 or more candidate.
This is how to count the winner.
the winning candidate must have 50% or above 50% of the total voter that cast their votes.(this is done bycounting all first preference)
if no candidate have 50% votes, but all votes are below 50%, then the candidate at the bottom of the list eliminates and his/her votes will be divided to the other candidates according to their second preference.
and the process continues on until their is one winner.
the thing is, i don't know where to start, i only created the database having the tables voter to store voters, votes to store votes cast by voter, candidate to store candidate.
i don't don't know how to go about the voting part using php codes.
could someone please help me out on this.
|