-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathchangepassword.php
More file actions
84 lines (77 loc) · 2.13 KB
/
changepassword.php
File metadata and controls
84 lines (77 loc) · 2.13 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
<?php
session_start();
include("header.php");
include("sidebar.php");
include("dbconnection.php");
if(isset($_SESSION[empid]))
{
header("Location: empaccount.php");
}
if(isset($_SESSION[custid]))
{
header("Location: account.php");
}
if(isset($_POST[submit]))
{
mysql_query("UPDATE customer SET password='$_POST[password]' where emailid='$_POST[emailid]'");
if(mysql_affected_rows() == 1)
{
$respass = "Password updated successfully...";
}
}
?>
<div id="main">
<a name="TemplateInfo"></a>
<h1>Forgot password</h1>
<p><strong>Please enter New Password and confirmation password to reset password </strong></p>
<form id="form1" name="form1" method="post" action="" onsubmit="return validate()">
<table width="521" height="208" border="0">
<?php
if(isset($_POST[submit]))
{
?>
<tr>
<th colspan="2" scope="row"><font color="#FF0000"><b><?php echo $respass; ?></b></font></th>
</tr>
<?php
}
else
{
?>
<tr>
<th width="155" height="39" scope="row">Email ID</th>
<td width="301"><input name="emailid" type="text" id="emailid" value="<?php echo $_GET[emailid] ; ?>" size="50" readonly="readonly" /></td>
</tr>
<tr>
<th height="39" scope="row">New Password</th>
<td><input name="password" type="password" id="password" size="50" /></td>
</tr>
<tr>
<th height="49" scope="row">Confirm password</th>
<td><input name="cpassword" type="password" id="cpassword" size="50" /></td>
</tr>
<tr>
<th scope="row"> </th>
<td><input name="submit" type="submit" class="button" id="submit" value="Recover password" /></td>
</tr>
<?php
}
?>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
</table>
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</div>
<!-- wrap ends here -->
</div>
<?php
include("footer.php");
?>