-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchangePassword.php
More file actions
32 lines (31 loc) · 885 Bytes
/
Copy pathchangePassword.php
File metadata and controls
32 lines (31 loc) · 885 Bytes
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
<?php
require 'user.php';
CheckIfUserLoggedIn();
?>
<?php
include 'Geeksforsaletop.php';
?>
<div id="content">
<?php
if(isset($_POST['newPassword1'])){
if($_POST['newPassword1'] == $_POST['newPassword2'])
try{
changePassword($_POST['oldassword'],$_POST['newPassword1']);
}catch (exception $e){
echo $e->getMessage();
}
echo "<p> Password changed</p>";
}
?>
<h1> Change password</h1>
<form method="post" action="changePassword.php">
<label for="Password">Old Password </label>
<input type="password" name="oldassword" required/><br/>
<label for="Password">New Password </label>
<input type="password" name="newPassword1" required/><br/>
<label for="Password">Retype password</label>
<input type="password" name="newPassword2" required/><br/>
<input type="submit" value="Update"/>
</div>
</BODY>
</HTML>