Preventing Multiple Poll Entries

Example

Restricting multiple votes in an election poll.

MGI Tags

  • mgiPoll

Steps

  1. Open the poll results page in a text editor.
  2. Insert the retainedIPEntries parameter in the mgiPoll tag.
  3. Save the poll results page.
  4. FTP the poll results page to the web server running MGI.
  5. Submit the poll.


Step 1: Open the poll results page in a text editor.

Open the poll results page in a text editing program that allows you to view and modify HTML.

Step 2: Insert the retainedIPEntries parameter in the mgiPoll tag.

Visitors can be restricting from voting in a poll multiple times based upon their IP number. In the retainedIPEntries parameter, enter an integer (whole number) to designate how many IP numbers should be held in memory as a comparison for the IP number of the current visitor. As the integer increases, the time until a visitor is allowed to vote in the poll again increases. Consider the number of visitors per time interval to determine what integer to use. For example, if you expect 50 visitors per hour and you want to restrict visitors to voting once per hour, then the enter "50" in the retainedIPEntries parameter. In the same example, if you want to restrict visitors to voting once per day, then enter "1200" in the retainedIPEntries parameter.
 
When a visitor submits the poll, their IP number is recorded in a database with the number of records entered in the retainedIPEntries parameter. Each visitor's IP number is added to the database until all records are full. The IP number of the next visitor to submit a poll replaces the oldest IP number in the database. Each time a visitor submits the poll, their IP number is compared to the IP numbers in the database. If the visitor's IP number matches an IP number in the database, then their poll answers are not added to the poll results and an error message is not displayed to the visitor (i.e., the visitor does not know that their multiple submissions have been ignored.). If the visitor's IP number does not match an IP number in the database, then their answers are added to the poll results.
<mgiPoll databasefilelocation="Surveys"
tableName="Election2000" formatFileLocation="pollformat.txt" 
tally="yes" tallyresultsby="total" colorcycle="blue,red"
maximumBarGraphLength="300" barGraphHeight="13" 
retainedIPEntries="50">

Step 3: Save the poll results page.

Save the changes you have made to the poll results page.

Step 5: FTP the poll results page to the web server running MGI.

Upload the poll results page to the web server using an FTP program.

Step 6: Submit the poll.

Access the poll with a web browser. Complete and submit the poll. The first time you submit the poll your answers are added to the poll results and the poll results display. If you immediately try to submit the poll again your answers are not added to the poll results, but the current results display.


[Return to the Administering Polls and Surveys Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]