<?php

//Update DB according to input and users email
$password = $_POST['password'];
$squestion = $_POST['squestion'];
$sanswer = $_POST['sanswer'];
$twit_id = $_POST['twit_username'];
$email = $_POST['email'];
if ($_POST && isset($_POST['submit'])) {
    echo "Test";
    $email = '*****@*****.**';
    include "MonarchPressDb.php";
    $conn = new MonarchPressDb('128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress');
    if (!empty($password)) {
        $conn->update_userPassword($email, $password);
    }
    if (!empty($squestion)) {
        $conn->update_userQuestion($email, $squestion);
    }
    if (!empty($sanswer)) {
        $conn->update_userAnswer($email, $sanswer);
    }
    if (!empty($twit_id)) {
        $conn->update_userTwitterHandle($email, $twit_id);
    }
}
?>
<html>
<head>

</head>