Location: PHPKode > scripts > WebsiteMemberManager > members-section/admin/php/update-password.php
<?php
$dbc = dbc::instance();
if (isset($save))
{

 $result = $dbc->prepare("SELECT * FROM wmm_admin");
 $rows = $dbc->executeGetRows($result);
 $row=$rows[0];
 $cpass = WMMcrypt($existing_password,$row['their_username']); 
 $result = $dbc->prepare("SELECT * FROM wmm_admin WHERE their_password='$cpass'");
 $rows = $dbc->executeGetRows($result);
 if (count($rows)>0)
 {
  $new_cpass = WMMcrypt($new_password,$row['their_username']); 
  $result = $dbc->prepare("UPDATE wmm_admin SET their_password='$new_cpass'");
  $result = $dbc->execute($result);
  include_once("main_menu-open.html");
  $feedback->setShow("Password changed.", "NOTICE");
  exit;
 }
 else
 {
  $feedback->setShow("The existing password provided was incorrect<br><br>CHANGES NOT SAVED!", "ERROR",0);
 }
}
include("update-password.html");
?>
Return current item: WebsiteMemberManager