PHP
  Home arrow PHP arrow Page 4 - Creating a Fraud-proof Voting System
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Creating a Fraud-proof Voting System
By: Ian Felton
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 102
    2004-12-21

    Table of Contents:
  • Creating a Fraud-proof Voting System
  • One Person, Multiple Addresses, Still One Vote
  • One Vote.php, Two States
  • Trust but Verify

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Fraud-proof Voting System - Trust but Verify


    (Page 4 of 4 )

    Now that there is a vote in the system, we need a simple verification script that will determine if the vote is legitimate. We’ll call this script, Verify.php. It looks like this:

    //Select the database
    mysql_select_db($database, $db);
    //Update the record to set the Boolean flag to true if the timestamp in the verification email matches the timestamp in the database record.
    $selectSQL = sprintf("UPDATE votes set pending=1 where bandID=%s AND email=%s AND time=%s", GetSQLValueString($_GET['band'], "int"),
    GetSQLValueString($_GET['email'], "text"),
    GetSQLValueString($_GET['time'], "text"));
    $Result2 = mysql_query($selectSQL, $UB_DATA);
    //Message for voter.
    $messages = "Thanks for voting. Remember, you can only vote once a day for a band , but you can vote for as many bands a day as you want.";

    This completes the general design of a fraud-proof voting system. There are a few ways to get around this system. ‘Fraud-proof’ is used in the general sense. Dick could obviously go around from computer to computer in the White House and keep voting for his favorite band. There’s some other ways around this system too, but I’ll let you figure that out. However, with this basic design, a voting system that prevents the basest level of fraud can be setup to your specific purpose relatively simply. Happy voting


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · You describe as most important requirement of the example that users shall not be...
       · Yup, that's pretty much what they are doing- not allowing folks from the same IP...
       · ... a NOT foolproof way of checking votes, and the only thing unusual from the...
       · "NOTHING is foolproof to a sufficiently talented fool!"
       · I agree. Using a user's IP address as a means of verifying the user, is a classic...
       · "There are a few ways to get around this system. ‘Fraud-proof’ is used in the...
       · That Jeb Bush is governor of Florida does not imply the 2000, or 2004 election was...
       · Thank you.
       · Yes of course, Florida was on the up and up. Katherine Harris, the state's chief...
       · 1 ip 1 vote is an unacceptable requirement for most websites. Sure, it will help...
       · You must surely be right to call this man a moron...In fact, Diebold's CEO DIDN'T...
       · Well, a Democrat, Chad Staton, linked to the NAACP attempted to register George...
       · Creating ballots - no. Removing large numbers of (mainly Democrat) ballots - yes....
       · A governor does not have the power to do that. A governor signs his state's...
       · How come there is no response? Talk about loooooozah! Democrats are whiny pathetic...
       · Peyton, you are really a moron. Good there are people like you to belive on...
       · Let's call each other names now, shall we?I am still interested in how Governor...
       · Can't we all just get along?
       · I second that.
       · http://www.gregpalast.com/detail.cfm?artid=27&row=2The powers in Florida simply...
       · [url=http://archives.cnn.com/2002/ALLPOLITICS/05/28/justice.florida.voting]Read this...
       · What does this have to do with the article?
       · At one time WebTV gave all users one of a handful of IP addresses.Poor WebTV...
       · I've always thought it was funny that just because Bush won Fl and his brother...
       · You should make this voting system as a download...like a zip or something. It...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT