Location: PHPKode > scripts > WebsiteMemberManager > members-section/members/php/modify.php
<?php
include_once("member-class.php");
$dbc = dbc::instance();
if (isset($_POST['save']))
{
 $cpass = WMMcrypt($_POST['existing_password'],$_SESSION['WMM_username']);
 $query = "SELECT id FROM wmm_members WHERE their_password=:cpass AND their_username='".$_SESSION['WMM_username']."' ";
 $result = $dbc->prepare($query);
 $result->bindParam(':cpass', $cpass, PDO::PARAM_STR);
 $rows = $dbc->executeGetRows($result);
 if(count($rows)>0)//password was correct
 {
  $member=new WMMmembers();
  $member->update($_SESSION['WMM_id'],$_POST);
  $_SESSION['member_details_array']=$member->get($_SESSION['WMM_id']);
  $feedback = new feedbackBox(); 
  $feedback->setShow("Details saved","Edit profile",0,"member");
  include("main_menu.html");
  include("footer.html");
  exit;
 }
 else
 {
  $feedback = new feedbackBox(); 
  $feedback->setShow("The existing password provided was incorrect<br><br>CHANGES NOT SAVED!","ERROR",0,"member");
 }
}
$member=new WMMmembers();
$row=$member->get($_SESSION['WMM_id']);
include("modify.html");
?>
Return current item: WebsiteMemberManager