'Username', 'password' => 'Password', 'password_confirm' => 'Re-enter Password', 'secret_id' => 'Pick a reminder question', 'secret_answer' => 'Your answer' ); $aGenders = array('M' => 'Male', 'F' => 'Female', 'N' => 'Prefer not to say'); require_once('/afs/ece.cmu.edu/web/ece/htdocs/tools/msc-game/encryption-keys.php'); // Get the secret questions $sSql = 'SELECT secret_id, secret_name FROM gm_lkp_user_secret'; $aSecretQuestions = DBConn::getArray($sSql, 'secret_id', 'secret_name'); // Get the age group list $sSql = 'SELECT age_group_id, age_group_name FROM gm_lkp_user_age_group'; $aAgeGroups = DBConn::getArray($sSql, 'age_group_id', 'age_group_name'); $oErr = new ErrorCollector(); if (!empty($_POST['submit'])) { // Scrub input foreach ($_POST as $sKey => $sVal) { $_POST[$sKey] = getPost($sKey); } // Validate input // Check for missing inputs foreach ($aRequiredFields as $sRequiredField => $sRequiredFieldDescription) { if (empty($_POST[$sRequiredField])) { $oErr->add('"' . $sRequiredFieldDescription . '" must be provided.', true); } } // Check for duplicate user $sSql = 'SELECT COUNT(user_id) AS num_users FROM gm_user WHERE user_username = ?'; if (DBConn::getValue($sSql, 'num_users', array($_POST['username'])) >= 1) { $oErr->add('The username "' . $_POST['username'] . '" is already in use. Please select another one.', true); $_POST['username'] = null; } if ($_POST['password'] != $_POST['password_confirm']) { $oErr->add('The passwords provided do not match.', true); } else if (!empty($_POST['password']) && strlen($_POST['password']) < $iMinPasswordLength) { $oErr->add('The password provided was too short. Please use a password with at least ' . $iMinPasswordLength . ' characters.'); } else if (strpos($_POST['password'], ' ') !== false) { $oErr->add('Your password can not contain any spaces.', true); } if (!$oErr->hasError()) { // Create the account $sSql = 'INSERT INTO gm_user (user_username, user_password, secret_id, secret_answer, age_group_id, user_gender, date_registered) VALUES (?, AES_ENCRYPT(?, ?), !, AES_ENCRYPT(?, ?), ?, ?, !)'; if (DBConn::executeNonQuery($sSql, array($_POST['username'], $_POST['password'], AES_ENCRYPTION_KEY_PASSWORD, $_POST['secret_id'], $_POST['secret_answer'], AES_ENCRYPTION_KEY_SECRET, $_POST['age_group_id'], $_POST['gender'], 'CURDATE()'))) { $iUserId = DBConn::getLastInsertId(); doRedirect('registerComplete.html'); } else { $oErr->add('We were unable to save your information. Please try again, or email us for help.', true); } } } $sErr = $oErr->toString(); $oTpl = new Savant2_Common(); ?> Register a Username and Password
Go To the Academy Web site

Quick Help:.

Want to know more about the Game?
Click here for more about The MySecureCyberspace Game.

Want to see what the Game is like?
Click here to view a demo video of the Game.

Want to download the Game?
Click here to download The MySecureCyberspace Game.

Want to know more about our Policies?
Click here for more about our Privacy Policy and Terms of Use.

Create an Account

Please correct the following:

_($sErr)?>

plugin('input', 'text', 'username', $_POST['username'], array('size' => 30, 'maxlength' => 20, 'class' => 'formField', 'id' => 'username')); ?> plugin('label', 'username', 'Username'); ?>
DO NOT USE YOUR
REAL NAME OR A
VARIATION OF IT

plugin('input', 'password', 'password', null, array('size' => 30, 'class' => 'formField', 'id' => 'password')); ?> plugin('label', 'password', 'Password'); ?>
or more characters,
no spaces. Do not create a password with all numbers starting with a zero, such as "012345"

plugin('input', 'password', 'password_confirm', null, array('size' => 30, 'class' => 'formField', 'id' => 'password_confirm')); ?> plugin('label', 'password_confirm', 'Re-enter Password'); ?>
Passwords must match

plugin('label', 'gender', 'Gender'); ?>

plugin('label', 'secret_id', 'Age Group'); ?>

plugin('label', 'secret_id', 'Pick a reminder
question'); ?>

plugin('input', 'text', 'secret_answer', $_POST['secret_answer'], array('size' => 30, 'maxlength' => 20, 'class' => 'formField', 'id' => 'secret_answer')); ?> plugin('label', 'secret_answer', 'Your answer'); ?>

In case you forget your password, you can reset it as long as you remember your answer to this question.