<?php require_once 'includes/QBCoref.class.php'; $qbc = new QBCoref(); if (!$qbc->isUser()) { header("Location: login.php"); } if (!empty($_POST['action'])) { $errors = array(); if ($_POST['action'] == "change-password") { if (!$qbc->verifyPassword($_POST['current-password'])) { $errors[] = "Current password doesn't match."; } else { if (empty($_POST['password'])) { $errors[] = "Password can not be empty."; } else { if ($_POST['password'] != $_POST['password-confirm']) { $errors[] = "Passwords do not match."; } } } if (empty($errors)) { $qbc->updatePassword($_POST['password']); header("Location: myaccount.php?success=1"); } } } ?> <!doctype html> <html lang="us"> <head>