-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnewpassword.php
More file actions
95 lines (76 loc) · 3.01 KB
/
newpassword.php
File metadata and controls
95 lines (76 loc) · 3.01 KB
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
<?php include("includes/a_config.php");?>
<?php
include("includes/conn.php");
include("includes/sessionconfig.php");
$cur_dte=date("Y-m-d");
?>
<?php
if(isset($_POST['btn_newpwadd'])){
$nwp=$_POST['txt_newpassword'];
$nwcp=$_POST['txt_confirmpassword'];
if($nwp==""){
$message="Please Enter the New Password";
}
else if($nwcp==""){
$message="Please Enter the Confirm Password";
}
else if($nwp!==$nwcp){
$message="Not Match the Password";
}
else if($nwcp=="9900" || $nwcp=="9900"){
$message="This Password Not Used";
}
else{
$password=MD5($_POST['txt_newpassword']);
$sql13 = "UPDATE user_master SET password='$password' WHERE user_key='$ses_ukey'";
if(mysqli_query($link, $sql13)){
echo "<script>
alert('Successfully Update Password.');
window.location.href='index.php';
</script>";
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include("includes/head-tag-contents.php");?>
</head>
<body>
<?php include("includes/design-top.php");?>
<div class="container" id="main-content">
<div class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-6">
<div class="row">
<div class="col-lg-12">
<section class="panel-primary panel-transparent">
<div class="panel-body">
<form role="form" id="form1" name="form1" method="post" action="">
<div class="form-group" align="center">
<label style="font-size: 130%;">User Name: <?php echo $ses_user; ?></label>
</div>
<div class="form-group" >
<label>New Password</label>
<input type="password" name="txt_newpassword" class="form-control" >
</div>
<div class="form-group" >
<label>Confirm Password</label>
<input type="password" name="txt_confirmpassword" class="form-control" >
</div>
<button type="submit" name="btn_newpwadd" class="btn btn-default btn-lg btn-block" style="background-color: #008CBA;">New Password</button>
</div>
</form>
</section>
</div>
</div>
</div>
</div>
</div>
</body>
<?php
mysqli_close($link);
?>
</html>