Update is_the_information_correct.php
[clinton/MarylandElectronicPetitionSignature.git] / is_the_information_correct.php
1 <?PHP
2 $web_first_name = $_COOKIE['web_first_name'];
3 $web_last_name = $_COOKIE['web_last_name'];
4 $web_house_number = $_COOKIE['web_house_number'];
5 $web_zip_code = $_COOKIE['web_zip_code'];
6 $DOB = $_COOKIE['pDOB'];
7 if ($web_first_name != '' && $web_last_name != '' && $web_house_number != '' && $web_zip_code != ''){
8 // ok to check for records
9 }else{
10 header('Location: warning_incomplete.php');
11 }
12 include_once('header.php');
13 $q = "select * from VoterList where LASTNAME = '$web_last_name' and FIRSTNAME = '$web_first_name' and HOUSE_NUMBER = '$web_house_number' and RESIDENTIALZIP5 = '$web_zip_code'";
14 $r = $petition->query($q);
15 $d = mysqli_fetch_array($r);
16 if ($d['VTRID'] != ''){
17 $_COOKIE['signature_status'] = 'verified';
18 $VTRID = $d['VTRID'];
19 $FIRSTNAME = $d['FIRSTNAME'];
20 $MIDDLENAME = $d['MIDDLENAME'];
21 $LASTNAME = $d['LASTNAME'];
22 $ADDRESS = $d['ADDRESS'];
23 $RESIDENTIALCITY = $d['RESIDENTIALCITY'];
24 $COUNTY = $d['COUNTY'];
25 $RESIDENTIALZIP5 = $d['RESIDENTIALZIP5'];
26 // set cookies for hard_copy.php
27 setcookie("pCOUNTY", $COUNTY);
28 setcookie("pNAME", "$FIRSTNAME $MIDDLENAME $LASTNAME");
29 setcookie("pADDRESS", "$ADDRESS $RESIDENTIALCITY $RESIDENTIALZIP5");
30 setcookie("pADDRESS1", "$ADDRESS");
31 setcookie("pADDRESS2", "$RESIDENTIALCITY MD $RESIDENTIALZIP5");
32 setcookie("pVTRID", $VTRID);
33 }else{
34 $_COOKIE['signature_status'] = 'invalid';
35 header('Location: warning_not_found.php');
36 }
37 ?>
38 <div class='row'>
39 <div class='col-sm-12' style='height:100px; text-align:center;'><h2>Is this information correct?</h2></div>
40 </div>
41 <div class='row'>
42 <div class='col-sm-6' style='height:50px; text-align:center;'>First Name</div><div class='col-sm-6' style='height:50px; text-align:center;'><?PHP echo $FIRSTNAME;?></div>
43 </div>
44 <div class='row'>
45 <div class='col-sm-6' style='height:50px; text-align:center;'>Middle Name </div><div class='col-sm-6' style='height:50px; text-align:center;'><?PHP echo $MIDDLENAME;?></div>
46 </div>
47 <div class='row'>
48 <div class='col-sm-6' style='height:50px; text-align:center;'>Last Name </div><div class='col-sm-6' style='height:50px; text-align:center;'><?PHP echo $LASTNAME;?></div>
49 </div>
50 <div class='row'>
51 <div class='col-sm-6' style='height:50px; text-align:center;'>Date of Birth </div><div class='col-sm-6' style='height:50px; text-align:center;'><?PHP echo $DOB;?></div>
52 </div>
53 <div class='row'>
54 <div class='col-sm-6' style='height:50px; text-align:center;'>Full Addresss </div><div class='col-sm-6' style='height:50px; text-align:center;'><?PHP echo $ADDRESS;?></div>
55 </div>
56 <div class='row'>
57 <div class='col-sm-2' style='height:50px; text-align:center;'>City</div><div class='col-sm-2'><?PHP echo $RESIDENTIALCITY;?></div>
58 <div class='col-sm-2'>County</div><div class='col-sm-2'><?PHP echo $COUNTY;?></div>
59 <div class='col-sm-2'>Zip</div><div class='col-sm-2'><?PHP echo $RESIDENTIALZIP5;?></div>
60 </div>
61 <div class='row'>
62 <div class='col-sm-6' style='height:50px; text-align:center;'><button type="button" class="btn btn-success" onclick="window.location.href='eligible.php'">YES</button></div>
63 <div class='col-sm-6' style='height:50px; text-align:center;'><button type="button" class="btn btn-danger" onclick="window.location.href='reset.php'">NO</button></div>
64 </div>
65
66
67
68
69
70
71
72
73 <?PHP include_once('footer.php');