-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathverifyCode.php
114 lines (88 loc) · 4.36 KB
/
verifyCode.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
ob_start();
session_start();
require_once 'dbconnect.php';
// if session is not set this will redirect to login page
if( !isset($_SESSION['user']) ) {
header("Location: index.php");
exit;
}
// select loggedin users detail
$res=mysql_query("SELECT * FROM staff WHERE userId=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome Home - <?php echo $userRow['userEmail']; ?></title>
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.codingcage.com">NIVEVIS</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="home.php">Home</a></li>
<li><a href="vehicleReg.php">Register Vehicle</a></li>
<li><a href="generateqrcode.php">Generate QR code</a></li>
<li class="active"><a href="verifyCode.php">Verify QR Code</a></li>
<li><a href="identification.php">Identification</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user"></span> Hi' <?php echo $userRow['userEmail']; ?> <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="logout.php?logout"><span class="glyphicon glyphicon-log-out"></span> Sign Out</a></li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div id="wrapper">
<div class="container" style="background-image: url(./images/NIVEVIS.png); background-size: cover; background-position: center; background-repeat: no-repeat; height: 650px;"><br/><br/>
<div class="page-header">
<h3 align="center" style="background-color:hsla(0,0%,100%,0.81); margin:0 0 0 0; padding:10px 20px 10px 20px;">VERIFY THE VEHICLE VERIFICATION NUMBER HERE
</div>
<div class="row">
<div class="col-lg-12">
<?php
// Make a MySQL Connection
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("vehicle_reg") or die(mysql_error());
if(isset($_POST['View'])){
$verificationNumber = $_POST['verificationNumber'];
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM users
WHERE verificationNumber='$verificationNumber'") or die(mysql_error());
// get the first (and hopefully only) entry from the result
// $row = mysql_fetch_array( $result );
// Print out the contents of each row into a table
}
?>
<h3 align="center">Please Enter The verification Number To View The Vehicle Detail</h3><br/>
<form action="identification.php" method="post" style="text-align:center;">
<input style="border-radius:5px; height:40px; width:300px; font-size:20px;" type="text" name="verificationNumber"><br/><br/>
<input style="background-color: #337ab7; border-radius:5px; padding: 15px 30px 15px 30px; color: #fff; font-size:22px;" type="submit" value="View Detail" name="View">
</form><br/><br/>
</div>
</div>
</div>
</div>
<script src="assets/jquery-1.11.3-jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>
<?php ob_end_flush(); ?>