The Below example will demonstrate a poll where the result is shown without reloading.
When a user choose an option above, a function called "getVote()" is executed. The
function is triggered by the "onclick" event:
The getVote() function does the following:
The text file (poll_result.txt) is where we store the data from the poll.
It is stored like this:
The first number represents the "Yes" votes, the second number represents the "No"
Note: Remember to allow your web server to edit the text file. Do NOT give everyone
access, just the web server (PHP).
Your Query was successfully sent!