31 lines
1.3 KiB
PHP
31 lines
1.3 KiB
PHP
<?php
|
|
$fileName = basename(__FILE__, ".php"); //grabs the file name and drops the extension
|
|
$fileName = ucwords($fileName); //capitalizes the first letter of every word
|
|
include("templates/signed-header.php");
|
|
?>
|
|
<form method="post" action="register.php" name="registerform">
|
|
<label for="login_input_username">Username</label>
|
|
<input id="login_input_username" type="text" pattern="[a-zA-Z0-9]{2,64}" name="user_name" required />
|
|
<label for="login_input_email">User email</label>
|
|
<input id="login_input_email" class="login_input" type="email" name="user_email" required />
|
|
<label for="login_input_password_new">Password</label>
|
|
<input id="login_input_password_new" class="login_input" type="password" name="user_password_new" pattern=".{6,}" required autocomplete="off" />
|
|
<label for="login_input_password_repeat">Repeat password</label>
|
|
<input id="repeatPassword" class="login_input" type="password" name="user_password_repeat" pattern=".{6,}" required autocomplete="off" />
|
|
<input type="submit" name="register" value="Register" />
|
|
</form>
|
|
<?php // show negative messages
|
|
if ($registration->errors) {
|
|
foreach ($registration->errors as $error) {
|
|
echo $error;
|
|
}
|
|
}
|
|
// show positive messages
|
|
if ($registration->messages) {
|
|
foreach ($registration->messages as $message) {
|
|
echo $message;
|
|
}
|
|
}
|
|
?>
|
|
</section>
|
|
</body>
|