-
- Purpose
In “Online Voting System” a voter can use his\her voting right online without any difficulty. He\She has to fill a registration form to register himself\herself. All the entries is checked by the DATABASE which has already all information about the voter. If all the entries are correct then a USER ID and PASSWORD is given to the voter, by using that ID and PASSWORD he\she can use his\her vote. If conditions are wrong then that entry will be discarded.
-
- Scope
The scope of the project that is hosted on the server. There is a DATABASE which is maintained by the Election Commision Of India in which all the names of voter with complete information is stored.
-
- Technologies to be used
This project will be a Web application to be developed in PHP having
- Database Design (My SQL)
- Form Design (HTML 4.0)
- Coding (PHP)
- Testing (WAMP SERVER)
- Reporting Tool (Data Report)
DFD: Level
<?php if (! isset($_Session['Sess_Name'])) {
header ("Location: login.php");}?><?php
if (! isset($_SESSION)) {session start ();} include "auth.php";include "header_voter.php";?><br><br>
<center><h3>Change Password</h3></center><h4 style="color: #e60808;"><?php global $nam; echo $nam;> </h4> <?php global $error; echo $error;>
<center><form action="change_pass_action.php" method="post" id="myform"> Current Password: <input type="password" name="cpassword" value="" > <br> <br> New Password: <input type="password" name="npassword" value="" > <br> <br> Confirm New Password: <input type="password" name="cnpassword" value="" > <br> <br> <input type="submit" name="cpass" value="UPDATE" > </form></center> <script type="text/javascript">
var frm validator = new Validator("myform"); frm validator. Add Validation ("cpassword","req","Please enter Current Password"); frmvalidator. Add Validation ("cpassword","maxlen=50"); frm validator. add Validation ("npassword","req","Please enter New Password"); frm validator. Add Validation ("npassword","maxlen=50"); frm validator. Add Validation ("cnpassword","req","Please enter Confirm New Password"); frm validator. Add Validation ("cnpassword","maxlen=50"); </script> <br> <br> <?php include "footer.php";?> <?php
session_start (); include "auth.php"; include "connection.php"; if(isset($_POST['cpass'])) {
$currentpass = md5($_POST['cpassword']); $newpass = md5($_POST['npassword']);
$cnewpass = md5($_POST['cnpassword']);
$currentpass = addslashes($currentpass);
$newpass = addslashes($newpass);
$cnewpass = addslashes($cnewpass);
$currentpass = mysqli_ real_ escape_ string ($con, $currentpass); $newpass = mysqli_ real _escape _string ($con, $newpass); $cnewpass = mysqli_real_escape_string($con, $cnewpass); $sql = mysqli_query($con, 'SELECT password FROM login users WHERE username = "'.$_SESSION['SESS_NAME'].'" '); $row = mysqli_fetch_assoc($sql); $pass = $row['password']; if ($currentpass! = $pass) {$error = "<center><h4><font color='#FF0000'>Incorrect Current Password! </h4></center></font>"; include ("change_pass.php");} else if ($currentpass == $pass && $newpass == $cnewpass) {$sql1 = mysqli_query($con, 'UPDATE loginusers SET password="'. md5($_POST['npassword']).'" WHERE username="‘. $_SESSION['SESS_NAME'].'" ');
$error = "<center><h4><font color ='green'>Password successfully changed! </h4></center></font>"; include ("change_pass.php");} else {$error = "<center><h4><font color='#FF0000'>New Password and Confirm Password does not match! </h4></center></font>"; include ("change pass. php");}} else {$error = "<center><h4><font color = '#FF0000'>Error! </h4></center></font>"; include ("change_pass.php");}?> <?php $con = mysqli_connect("localhost","root","","polltest") or die ("error”. mysqli_error($con) );?> <br> <br>
Suman Rani* 2
Sunil Kumar Tiwari 1
10.5281/zenodo.15168946