-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchangepass.php
272 lines (221 loc) · 7.55 KB
/
changepass.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<?php
session_start();
error_reporting(0);
include("include/config.php");
?>
<?php
$con=mysqli_connect("localhost","root","","organic_shop_db")or die ("Couldn't connect");
?>
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
<!--theme-style-->
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<!--//theme-style-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--fonts-->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
<!--//fonts-->
<script src="js/jquery.min.js"></script>
<!-- internal javascrpt code -->
<script>
$('.message a').click(function(){
$('form').animate({height: "toggle", opacity: "toggle"}, "slow");
});
function loginValid(mail,passwrd)
{
var mailformat = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
var passw=/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*\s).{8,15}$/;
if(mail.value.match(mailformat))
{
//document.login.email.focus();
if(passwrd.value.match(passw))
{
//window.location="succ_login.php";
//window.location="succes_login.php";
return true;
}
else
{
//alert('Wrong password.Please enter a valid password...!');
window.location="login.php";
}
}
else
{
//alert("Please enter a valid Email-id and password !");
document.login.email.focus();
}
}
</script>
<style>
.errmessage
{
color:red;
}
</style>
</head>
<body>
<!--header-->
<div class="header">
<div class="bottom-header" style="background-color:palegreen;">
<div class="container">
<div class="header-bottom-left">
<div class="logo">
<a href="index.html"><img src="images/logo.png" alt=" " /></a>
</div>
<div class="clearfix"> </div>
</div>
<div class="header-bottom-right">
<div class="account"><a href="login.php"><span> </span>YOUR ACCOUNT</a></div>
<ul class="login">
<li><a href="login.php"><span> </span>LOGIN</a></li> |
<li ><a href="register.php">SIGNUP</a></li>
</ul>
<div class="cart"><a href="#"><span> </span>CART</a></div>
<div class="clearfix"> </div>
</div>
<div class="clearfix"> </div>
</div>
</div>
</div>
<!---->
<div class="container">
<div class="account_grid">
<div class=" login-right">
<h3>CHANGE PASSWORD</h3>
<form onsubmit="return loginValid(document.login.mail,document.login.password)" action="login.php" name="login" id="login" method="POST">
<div>
<span>OLD PASSWORD<label style="color:red;">*</label></span>
<input type="password" placeholder="Enter Password " class="input input1 form-control" name="password" id="Opassword" required>
</div>
<div>
<span> NEW PASSWORD<label style="color:red;">*</label></span>
<input type="password" placeholder="Enter Password " class="input input1 form-control" name="Npassword" id="Npassword" required>
</div>
<div>
<span>CONFIRM PASSWORD<label style="color:red;">*</label></span>
<input type="password" placeholder="Enter Password " class="input input1 form-control" name="rpassword" id="Npassword" required>
</div>
<input type="submit" name="submit" value="SUBMIT" >
</form>
</div>
<div class="clearfix"> </div>
</div>
<div class="sub-cate">
<div class=" top-nav rsidebar span_1_of_left">
<ul class="menu">
<li>
<ul class="kid-menu">
<li><a href="index.html">Home</a></li>
<li ><a href="register.php">Register</a></li>
<li ><a href="login.php">Login</a></li>
</ul>
</li>
</ul>
</div>
<!--initiate accordion-->
<script type="text/javascript">
$(function() {
var menu_ul = $('.menu > li > ul'),
menu_a = $('.menu > li > a');
menu_ul.hide();
menu_a.click(function(e) {
e.preventDefault();
if(!$(this).hasClass('active')) {
menu_a.removeClass('active');
menu_ul.filter(':visible').slideUp('normal');
$(this).addClass('active').next().stop(true,true).slideDown('normal');
} else {
$(this).removeClass('active');
$(this).next().stop(true,true).slideUp('normal');
}
});
});
</script>
<div class=" chain-grid menu-chain">
<a href="single.html"><img class="img-responsive chain" src="images/a.jpg" alt=" " /></a>
<div class="grid-chain-bottom chain-watch">
<span class="actual dolor-left-grid">300$</span>
<span class="reducedfrom">500$</span>
<h6>Lorem ipsum dolor</h6>
</div>
</div>
<a class="view-all all-product" href="product.html">VIEW ALL PRODUCTS<span> </span></a>
</div>
<div class="clearfix"> </div>
</div>
<!---->
<div class="footer">
<div class="footer-bottom">
<div class="container">
<div class="footer-bottom-cate">
<h6>CATEGORIES</h6>
<ul>
<li><a href="#">Curabitur sapien</a></li>
<li><a href="#">Dignissim purus</a></li>
<li><a href="#">Tempus pretium</a></li>
<li ><a href="#">Dignissim neque</a></li>
<li ><a href="#">Ornared id aliquet</a></li>
<li><a href="#">Ultrices id du</a></li>
<li><a href="#">Commodo sit</a></li>
<li ><a href="#">Urna ac tortor sc</a></li>
</ul>
</div>
<div class="footer-bottom-cate bottom-grid-cat">
<h6>FEATURE PROJECTS</h6>
<ul>
<li><a href="#">Curabitur sapien</a></li>
<li><a href="#">Dignissim purus</a></li>
<li><a href="#">Tempus pretium</a></li>
<li ><a href="#">Dignissim neque</a></li>
<li ><a href="#">Ornared id aliquet</a></li>
<li><a href="#">Ultrices id du</a></li>
<li><a href="#">Commodo sit</a></li>
</ul>
</div>
<div class="footer-bottom-cate">
<h6>TOP BRANDS</h6>
<ul>
<li><a href="#">Curabitur sapien</a></li>
<li><a href="#">Dignissim purus</a></li>
<li><a href="#">Tempus pretium</a></li>
<li ><a href="#">Dignissim neque</a></li>
<li ><a href="#">Ornared id aliquet</a></li>
<li><a href="#">Ultrices id du</a></li>
<li><a href="#">Commodo sit</a></li>
<li ><a href="#">Urna ac tortor sc</a></li>
<li><a href="#">Ornared id aliquet</a></li>
<li><a href="#">Urna ac tortor sc</a></li>
<li ><a href="#">Eget nisi laoreet</a></li>
<li ><a href="#">Faciisis ornare</a></li>
</ul>
</div>
<div class="footer-bottom-cate cate-bottom">
<h6>OUR ADDERSS</h6>
<ul>
<li>Aliquam metus dui. </li>
<li>orci, ornareidquet</li>
<li> ut,DUI.</li>
<li >nisi, dignissim</li>
<li >gravida at.</li>
<li class="phone">PH : 6985792466</li>
<li class="temp"> <p class="footer-class">Design by <a href="http://w3layouts.com/" target="_blank">W3layouts</a> </p></li>
</ul>
</div>
<div class="clearfix"> </div>
</div>
</div>
</div>
</body>
</html>
<?php
if(isset($_POST['submit']));
{
&old=$_POST['password'];
$password1=$_POST['Npassword'];
$sql1="UPDATE tbl_login SET password='$Npassword'
?>