This tutorial will teach you how to create a simple voting system in PHP
. And it has a two user side, the student and the admin, for the student side is were the user vote there candidate while for the admin is the control unit of the system that can edit, update, and see the results or count of all the candidates. This simple voting system is creating a vote candidates and position, and it generates result for all the candidates that the user voted.
Script for the Vote Process
$position = $_POST['position_' . $row['position_id']];
mysql_query("INSERT INTO votes (candidate_id,student_id) VALUES ('$position','".$_SESSION['student_id']."')")
$_SESSION['checkVote'] = 1;
Hope you learn it and enjoy coding. Thanks.