Location: PHPKode > scripts > WebsiteMemberManager > members-section/admin/php/update-email-address.php
<?php
if (isset($save))
{
 $dbc = dbc::instance();
 $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)
 {
  $contact_email = clean_input($contact_email);
  $update_query = "UPDATE wmm_admin SET contact_email='$contact_email'";
  $success_msg="Email admin contact address changed to:<br> $contact_email";
  $result = $dbc->prepare($update_query);
  $result = $dbc->execute($result);
  $feedback->setShow($success_msg, "NOTICE");
 }
 else
 {
  $feedback->setShow("The password provided was incorrect<br><br>CHANGES NOT SAVED!", "ERROR",0);
 }
}
$result = $dbc->prepare("SELECT * FROM wmm_admin");
$rows = $dbc->executeGetRows($result);
$row=$rows[0];
include("update-email-address.html");
?>
<script LANGUAGE="JavaScript"><!--
document.AF.contact_email.value="<?php echo $row['contact_email']; ?>";
// --></script>
Return current item: WebsiteMemberManager