Location: PHPKode > projects > Guild DKP System > dkpsystem1.4/includes/admin/changepassword.php
<?php
$ChangePassword = $_POST[ChangePassword];
$txtPassword = $_POST[txtPassword];
$txtPassword2 = $_POST[txtPassword2];
if(isset($ChangePassword)) {
	$tempOldPassword = @mysql_result($db->query("SELECT password FROM dkp_login WHERE username=\"$username\""), 0);
	if($txtPassword == $tempOldPassword) {
		$sql = $db->query("UPDATE dkp_login SET password=\"$txtPassword2\"");
		if($sql) {
			systemMessage("Password Updated", "Your password has been updated.<br><br>Please wait while you are re-directed in 5 seconds.");
		}
	}
	else {
		systemMessage("Password Mismatch", "There has been an error:<br><br>- Your old password does not match the one on record.<br><br>You will be automatically re-directed in 5 seconds.");
	}
}
?>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
  <tr>
    <td bgcolor="#003366"><font color="#FFFFFF" size="2" face="Tahoma"><strong>Change 
      Password</strong></font></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><form action="" method="post" name="formChangepassword" id="formChangepassword">
        <table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr> 
            <td colspan="2" bgcolor="#003366"><font color="#CCCCCC" size="1" face="Tahoma"><strong>Details</strong></font></td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">Old 
              Password</font></strong></u></td>
            <td bgcolor="#CCCCCC"><input name="txtPassword" type="password" id="txtPassword" size="35"></td>
          </tr>
          <tr> 
            <td bgcolor="#999999"><u><strong><font color="#000000" size="1" face="Tahoma">New 
              Password</font></strong></u></td>
            <td bgcolor="#CCCCCC"><input name="txtPassword2" type="password" id="txtPassword2" size="35"></td>
          </tr>
          <tr> 
            <td bgcolor="#999999">&nbsp;</td>
            <td bgcolor="#CCCCCC"><input name="ChangePassword" type="submit" id="ChangePassword" value="Change Password"></td>
          </tr>
        </table>
      </form></td>
  </tr>
</table>
Return current item: Guild DKP System