Click to See Complete Forum and Search --> : Florida Election SW/ How difficult could it be?


vagabond
09-14-2002, 12:37 PM
I live in Broward County Florida, home of sunshine and screwey elections. Less than 2 years ago Broward county was talking about buying electronic voting machines. The machines were purchased, but for some reason they did not work?! How easy would it be to write voting software? Just for the hell of it, and since I was pretty bored, I decided to write a small script that records votes in a mysql database. Less than an hour later and with 51 lines, I did it. Sure I don't have a touch screen, but how hard could that really be to implement. All you need for this to work would be an opensource OS, opensource Http server and an opensource browser.

It took Miami/Dade and Broward 2 years and heaps of money, and they still didn't get it right !

How many lines would it take you to write something like this in whatever language ?

Basically, make a choice and record it, that's it !
http://vagabond.homeip.net/cgi-bin/vote

#!/usr/bin/perl -wT
use strict;
use CGI qw(:standard);
use CGI::Pretty;
use CGI::Carp 'fatalsToBrowser';
$CGI::POST_MAX=1024 * 100; # max 100K posts
$CGI::DISABLE_UPLOADS = 1; # no uploads
use DBI;

print header;
print start_html("The answer to Florida's Election problems"),
h1("Please cast your vote"),
start_form,
radio_group(-name=>"Candidate",
-values=>["Janet Reno","Bill McBride"],
-linebreak=>"true",
-default=>"-"),
p,
submit(-name=>"Submit Vote"),
end_form,
hr;

if (param("Candidate")) {
print "You voted for: ",em(param("Candidate")),
p,
start_form,
"Are you 100% sure that the name above is the person you want to vote for ?",
hidden(-name=>"Candidate1", -default=>param("Candidate")),
p,
table({-border=>"3",-width=>"25%",-bordercolor=>"#ffffff"},
TR(
td(submit(-name=>"Yes",-value=>"Yes")),
td({-align=>"right"},submit(-name=>"No",-value=>"No")),
),),
}

if (param("Candidate1") && param("Yes")){
my $dbh = DBI->connect("DBI:mysql:Broward:;linux","damn","bush")
or die "Couldn't connect to database: " . DBI->errstr;
my $sth = $dbh->prepare("INSERT into BR2002PRI VALUES (?)")
or die "Couldn't prepare statement: " . $dbh->errstr;
$sth->execute(param("Candidate1"))
or die "Couldn't execute statement: " . $sth->errstr;
$sth->finish;
$dbh->disconnect;
print "Your vote has been cast\nGoodbye";
print qq |<meta http-equiv="refresh" content="3;URL=/cgi-bin/vote">|;
}

print end_html;

spiderbaby1958
09-14-2002, 12:50 PM
Either the establishment Democrats learned a lesson in dirty politics from the Republicans and stole the nomination for governor away from Janet Reno

or

The computers they used for the election were loaded with Windows XP. :D