aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/Views/auth/register.php
blob: f98102e80fef51c16fe325838422f567028b52ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php // Registration form.?>
<div class="auth-page">
    <h1>Register</h1>
    <?php include __DIR__ . '/../partials/flash.php'; ?>
    <form method="POST" action="/register" class="auth-form">
        <?= \App\Csrf::field() ?>
        <label for="username">Username</label>
        <input type="text" id="username" name="username" required
               pattern="[a-zA-Z0-9_]{3,20}" title="3-20 characters: letters, numbers, underscores">

        <label for="email">Email</label>
        <input type="email" id="email" name="email" required>

        <label for="password">Password</label>
        <input type="password" id="password" name="password" required minlength="8">

        <label for="password_confirm">Confirm password</label>
        <input type="password" id="password_confirm" name="password_confirm" required minlength="8">

        <button type="submit">Register</button>
    </form>
    <p>Already have an account? <a href="/login">Log in</a></p>
</div>