-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange_passwordform.php
45 lines (40 loc) · 1.13 KB
/
change_passwordform.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
<!DOCTYPE html>
<html>
<head>
<title>Change Password</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style.css">
<script>
function validate() {
var password1 = document.getElementById("password1").value;
var password2 = document.getElementById("password2").value;
alert(password1+" "+password2);
if (password1 != password2) {
alert("Passwords do not match.");
return false;
}
return true;
}
</script>
</head>
<body>
<div id="frm">
<form action="change_password.php" onSubmit="return validate()" method="post" >
Changing Password:<br/>
<p>
<label>New Password:</label>
<input type="Password" name="password1">
</p>
<p>
<label>Re-Enter New Password:</label>
<input type="Password" name="password2">
<p id="message"></p>
</p>
<p>
<input type="submit" value="Change password">
<br><br>
</p>
</form>
</div>
</body>
</html>