forked from prapti19/EmployeeManagementSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locam_reset_pass.php
127 lines (112 loc) · 3.62 KB
/
locam_reset_pass.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
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
include('connsp.php');
session_start();
if(isset($_REQUEST['login'])) //name
{
//echo "come by submit";
$user=$_REQUEST['unm'];
$aadhar=$_REQUEST['aadhar'];
$pass=$_REQUEST['pass'];
$cpass=$_REQUEST['confirmpass'];
$lgn="select * from locam where user='$user' AND aadhar_no='$aadhar'"; //agar match karegi values AND returns 1 when both same
#exit();
$res =$connsp->query($lgn); //string is passed in query a executed by connection
$chk=$res->num_rows; // mysqul function...count kitni no. of rows affect hui lgn se...wo batata hai
if($chk==1) //IF INSERT get success then ...
{
$_SESSION['unm']=$user;
$_SESSION['aadhar']=$aadhar;
if($pass==$cpass)
{
$up="update locam set pass='$pass' where user='$user'";
$res_up=$connsp->query($up);
if($res_up)
{
?>
<script type="text/javascript">
alert('update success');
</script>
<?php
}
}
else
{
echo "update not success";
}
?>
<?php
}
else
echo "login not success";
}
?>
<head>
<title>Reset Password</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">
</script>
<script>
function back(){
window.location="locam_login.php";
}
</script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.bg
{
background-image: url('m1.jpg');
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
padding-bottom:300px;
}
</style>
</head>
<body>
<div class='bg'>
<br>
<div class="second" style="float:right; "><button class="btn btn-success" onclick="back()" type="button">Back</button></div>
<br><br>
<form action="" method="POST">
<table align="center" cellpadding=25px>
<caption><h1 font-size="20px" style="color: white;" ><u><b>Reset Password Details</b></u></h1></caption>
<tr>
<td style="color: white;"><h2 font-size="15px"><b>Username</b></h2></td>
<td><input type="text" name="unm" style="width:250px; height: 25px;"></td>
</tr>
<tr>
<td style="color: white;"><h2 font-size="15px"><b>Adhar Card Number</b></h2></td>
<td><input type="text" name="aadhar" style="width:250px; height: 25px;"></td>
</tr>
<tr>
<td style="color: white;"><h2 font-size="15px"><b>New Password</b></h2></td>
<td><input type="password" name="pass" style="width:250px; height: 25px;"></td>
</tr>
<tr>
<td style="color: white;"><h2 font-size="15px"><b>Confirm Password</b></h2></td>
<td><input type="password" name="confirmpass" style="width:250px; height: 25px;"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="login" value="Submit" style="width:90px; height:45px; font-weight:bold; border-radius: 5px; background-color: dark-green"></td>
<td></td>
</tr>
<?php
include('connsp.php');
//include('tm_new.php');
$sq="select * from locam ";
$res = $connsp->query($sq);
while($fe=$res->fetch_object())
{
?>
<?php
}
?>
</table>
</form>
</body>
</html>