/
change_password.php
74 lines (63 loc) · 2.92 KB
/
change_password.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
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Welcome</title>
<!-- Font Icon -->
<link rel="stylesheet" href="fonts/material-icon/css/material-design-iconic-font.min.css">
<!-- Main css -->
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="main">
<!-- Sing in Form -->
<section class="sign-in">
<div class="container">
<div class="signin-content">
<div class="signin-image">
<figure><img src="images/signin-image.jpg" alt="sing up image"></figure>
</div>
<div class="signin-form">
<h1 class="form-title">Welcome <?php echo $_SESSION['name'];?>, <a href="logout.php">Logout</a></h1>
<h3><a href="welcome.php">Home</a></h3>
<h3>Change Password</h3>
<?php
if(count($_GET)>0){
if($_GET['status']==200){
echo "<span style='color:green;text-align:center;'>Password changed successfully !</span>";
}
if($_GET['status']==201){
echo "<span style='color:red;text-align:center;'>Invalid Old password !</span>";
}
}
?>
<form method="POST" class="register-form" id="register-form" action="change_password_a.php">
<div class="form-group">
<label for="pass"><i class="zmdi zmdi-lock"></i></label>
<input type="password" name="old_pass" id="old_pass" placeholder="Password" required />
</div>
<div class="form-group">
<label for="re-pass"><i class="zmdi zmdi-lock-outline"></i></label>
<input type="password" name="new_pass" id="new_pass" placeholder="Repeat your password" required />
<span id="CheckPasswordMatch" style="color:red;"></span>
</div>
<span><i class="zmdi zmdi-eye" id="show_password"></i>Show Password</span>
<div class="form-group form-button">
<input type="submit" name="change_pass" id="signup" class="form-submit" value="Change Password"/>
</div>
</form>
</div>
</div>
</div>
</section>
</div>
<!-- JS -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="js/main.js"></script>
</body><!-- This templates was made by Colorlib (https://colorlib.com) -->
</html>