<?php require 'includes/header-no-nav.php'; //Checking to see if we've already submitted registration if (isset($_POST['username'])) { //We have, registering the account $keyAddition = new ApiKey($_POST['keyID'], $_POST['vCode'], 0, $db); $success = User::doRegistration($_POST['username'], $_POST['password'], $_POST['password_verify'], $_POST['default_id'], $db); if ($success) { $stmt = $db->prepare('SELECT * FROM user_accounts WHERE username = ? LIMIT 1'); $stmt->execute(array($_POST['username'])); $accountInfo = $stmt->fetch(); $keyAddition = new ApiKey($_POST['keyID'], $_POST['vCode'], $accountInfo['uid'], $db); $keyAddition->updateAPIKey(); $char = new Character($_POST['default_id'], $keyAddition->getKeyID(), $keyAddition->getVCode(), $keyAddition->getAccessMask(), $db, $accountInfo['uid']); if ($char->getExistance() or $char->getExistance() == FALSE) { $char->updateCharacterInfo(); } $register_success = TRUE; } else { $register_success = FALSE; } } ?> <div class="opaque-container" style="height: 100%; padding-bottom: 50px; margin-top: 10%"> <div class="row" style="width: 100%;"> <?php if ($request['action'] == '1' or !$request['action']) { ?>