-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpasswd_reset.php
66 lines (49 loc) · 1.48 KB
/
passwd_reset.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
session_start();
if(!isset($_SESSION ["email"]))
{
header("Location:login.php");
}
else
{
$email=$_SESSION['email'];
}
echo"<form action='passcheck.php' method='POST' name='passw_reset' onsubmit='return ConfirmPassword()' class='password_change_form'>";
echo "<input type='hidden' name='email' value='$email' >";
echo"<label class='label'>Old Password :</label>";
echo"<input class='password' type='password' name='opassword'>";
echo"<br>";
echo"<label class='label'>New Password :</label>";
echo"<input class='password'type='password' name='npassword'>";
echo"<br>";
echo"<label class='label'>Confirm New Password :</label>";
echo"<input class='password' type='password' name='cpassword'>";
echo"<br>";
echo "<input class='submit' type='submit' value='submit'>";
echo"</form>";
echo "<script>function ConfirmPassword()
{
var newpass = document.forms['passw_reset']['npassword'];
var cpass = document.forms['passw_reset']['cpassword'];
if(newpass.value==cpass.value){
return true;
}
else{
window.alert('The passwords dont match');
return false;
}
}</script>";
?>
<br>
<br>
<center><a href='logout.php 'class='submit'>back</a></center>
</body>
</html>