index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1">
<title>CR Voting | Green
Syntax</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css"
rel="stylesheet">
<link
href='http://fonts.googleapis.com/css?family=Ubuntu'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Raleway'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Oswald'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Roboto+Condensed'
rel='stylesheet' type='text/css'>
<style>
body{
margin:0px;
padding:0px;
}
.headerFont{
font-family: 'Ubuntu',
sans-serif;
font-size: 24px;
}
.subFont{
font-family: 'Raleway',
sans-serif;
font-size: 14px;
}
.specialHead{
font-family: 'Oswald',
sans-serif;
}
.normalFont{
font-family: 'Roboto
Condensed', sans-serif;
}
a {
color: #FFFFFF;
text-decoration:
none;
}
a:link {
color: #FFFFFF;
text-decoration:
none;
}
/* visited link */
a:visited {
color:
#FFFFFF;
text-decoration: none;
}
/* mouse over link */
a:hover {
color:
#FFFFFF;
text-decoration: none;
}
/* selected link */
a:active {
color:
#FFFFFF;
text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<nav class="navbar navbar-default navbar-fixed-top
navbar-inverse
" role="navigation">
<div class="container">
<button type="button"
class="navbar-toggle" data-toggle="collapse"
data-target="#example-nav-collapse">
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
</button>
<div
class="container-fluid">
<div
class="row">
<div
class="col-sm-12">
<div class="jumbotron text-center text-block"
style="padding-top:170px;">
<img src="images/Vote.png" >
<h1 class="specialHead">Online Voting System</h1>
<a href="cast.html" class="btn btn-primary btn-md
specialHead"> <span class="glyphicon
glyphicon-tag"></span> Cast Your Vote</a>
</div>
</div>
</div>
</div>
<div class="conatiner"
id="featuresTab">
<div
class="row">
<div
class="col-sm-12 text-center">
<div class="page-header"
style="padding-top:50px;padding-bottom:50px">
<h1 class="normalFont" style="font-size:44px;" >WHAT IS
IT.</h1>
<p class="subFont" style="font-size:24px;"><em>A
Intractive Way To Solve Conventional
Voting.</em></p>
</div>
</div>
</div>
</div>
<footer>
<div
class="container">
<div
class="row">
<div class="col-sm-6 text-center">
<h2 class="specialHead">Deep<br></h2>
</div>
</div>
</div>
</footer>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script
src="js/bootstrap.min.js"></script>
</body>
</html>
cast.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1">
<title>Voting Panel</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css"
rel="stylesheet">
<link
href='http://fonts.googleapis.com/css?family=Ubuntu'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Raleway'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Oswald'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Roboto+Condensed'
rel='stylesheet' type='text/css'>
<style>
.headerFont{
font-family: 'Ubuntu',
sans-serif;
font-size: 24px;
}
.subFont{
font-family: 'Raleway',
sans-serif;
font-size: 14px;
}
.specialHead{
font-family: 'Oswald',
sans-serif;
}
.normalFont{
font-family: 'Roboto
Condensed', sans-serif;
}
</style>
</head>
<body>
<div class="container">
<nav class="navbar navbar-default
navbar-fixed-top navbar-inverse
" role="navigation">
<div class="container">
<button type="button"
class="navbar-toggle" data-toggle="collapse"
data-target="#example-nav-collapse">
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
</button>
<div
class="navbar-header">
<a
href="index.html" class="navbar-brand headerFont
text-lg"><strong>eVoting</strong></a>
</div>
<div
class="collapse navbar-collapse"
id="example-nav-collapse">
<ul
class="nav navbar-nav">
-->
</ul>
<button type="submit" class="btn btn-success navbar-right
navbar-btn"><span class="normalFont"><strong>Admin
Panel</strong></span></button>
</div>
</div> <!-- end of
container -->
</nav>
<div class="container"
style="padding:100px;">
<div class="row">
<div
class="col-sm-12" style="border:2px solid gray;">
<div
class="page-header">
<h2 class="specialHead">Choose Your
Candidate.</h2>
<p class="normalFont">Prove Your Authencity of being correct
voter.</p>
</div>
<form
action="saveVote.php" method="POST">
<div
class="form-group">
<label>Voter's Name :</label><br>
<input type="text" name="voterName" pattern="[A-Za-z]{6,}"
title="Enter Your Full Name" placeholder="Enter Your Full Name"
class="form-control" required/><br>
<label>Voter's Registered Email ID
:</label><br>
<input type="text" name="voterEmail" placeholder="Enter Your
Email ID" class="form-control"/><br>
<label>Voter's Card No. :</label><br>
<input id="id1" type="text" name="voterID" placeholder="Enter
Your Voter Uniquie ID" class="form-control"
required/><br>
<h3 class="normalFont">Selet Any One of Them</h3>
<div class="radio">
<label for="">
<input type="radio" name="selectedCandidate" value="BJP">
<strong>ABC</strong>
</label><br>
<label for="">
<input type="radio" name="selectedCandidate" value="INC">
<strong>XYZ</strong>
</label><br>
<label for="">
<input type="radio" name="selectedCandidate" value="AAP">
<strong>PQR</strong>
</label><br>
<label for="">
<input type="radio" name="selectedCandidate" value="TMC">
<strong>DPK</strong>
</label><br>
<br>
<hr>
<button type="submit" name="submit" class="btn
btn-primary"><strong>Submit</strong></button>
<button type="submit" class="btn
btn-default">Decline</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script
src="js/bootstrap.min.js"></script>
</body>
</html>
saveVote:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible"
content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1">
<title>Bootstrap 101
Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css"
rel="stylesheet">
<link
href='http://fonts.googleapis.com/css?family=Ubuntu'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Raleway'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Oswald'
rel='stylesheet' type='text/css'>
<link
href='http://fonts.googleapis.com/css?family=Roboto+Condensed'
rel='stylesheet' type='text/css'>
<style>
.headerFont{
font-family: 'Ubuntu',
sans-serif;
font-size: 24px;
}
.subFont{
font-family: 'Raleway',
sans-serif;
font-size: 14px;
}
.specialHead{
font-family: 'Oswald',
sans-serif;
}
.normalFont{
font-family: 'Roboto
Condensed', sans-serif;
}
</style>
</head>
<body>
<div class="container">
<nav class="navbar navbar-default navbar-fixed-top
navbar-inverse
" role="navigation">
<div class="container">
<button type="button"
class="navbar-toggle" data-toggle="collapse"
data-target="#example-nav-collapse">
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
<span
class="icon-bar"></span>
</button>
<div
class="navbar-header">
<a
href="index.html" class="navbar-brand headerFont
text-lg"><strong>eVoting</strong></a>
</div>
<div
class="collapse navbar-collapse"
id="example-nav-collapse">
<ul
class="nav navbar-nav">
</ul>
<button type="submit" class="btn btn-success navbar-right
navbar-btn"><span class="normalFont"><strong>Admin
Panel</strong></span></button>
</div>
</div> <!-- end of
container -->
</nav>
<div class="container"
style="padding-top:150px;">
<div class="row">
<div
class="col-sm-4"></div>
<div
class="col-sm-4 text-center" style="border:2px solid
gray;padding:50px;">
<?php
require('config.php');
if(isset($_POST["submit"])){
if(isset($_POST["voterName"])
&& isset($_POST["voterEmail"]) &&
isset($_POST["voterID"]) &&
isset($_POST["selectedCandidate"]))
{
$name=
test_input($_POST["voterName"]);
$email=
test_input($_POST["voterEmail"]);
$voterID=
test_input($_POST["voterID"]);
$selection= test_input($_POST["selectedCandidate"]);
}
}
else
{
echo "<br>All Field
Recquired";
}
$DB_HOST= "localhost";
$DB_USER="root";
$DB_PASSWORD="";
$DB_NAME="db_evoting";
$conn=
@mysqli_connect($DB_HOST,$DB_USER,$DB_PASSWORD,$DB_NAME)
or die("Couldn't Connect
to Database :");
$sql= "INSERT INTO db_evoting.tbl_users
VALUES(null,'".$name."','".$email."','".$voterID."','".$selection."');";
if(mysqli_query($conn, $sql)){
echo "<img
src='images/success.png' width='70' height='70'>";
echo "<h3 class='text-info
specialHead text-center'><strong> YOU'VE
SUCCESSFULLY VOTED.</strong></h3>";
echo "<a href='index.html'
class='btn btn-primary'> <span class='glyphicon
glyphicon-ok'></span> <strong> Finish</strong>
</a>";
}
else
{
echo "<img
src='images/error.png' width='70' height='70'>";
echo "<h3 class='text-info
specialHead text-center'><strong> SORRY! WE'VE SOME
ISSUE..</strong></h3>";
echo "<a href='index.html'
class='btn btn-primary'> <span class='glyphicon
glyphicon-ok'></span> <strong> Finish</strong>
</a>";
}
?>
</div>
<div
class="col-sm-4"></div>
</div>
</div>
</div>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script
src="js/bootstrap.min.js"></script>
</body>
</html>
Get Answers For Free
Most questions answered within 1 hours.