<div class="register-box">
    <form name="registration" onsubmit="return validateForm()" action="<?=base_url('login/register/create')?>" method="post">
        <?=csrf_field()?>
        <br>
        <label for="uname"><b>Username (32 characters max)</b></label>
        <input type="text" placeholder="Enter Username" name="uname" maxlength="32" required>
        <br>
        <label for="psw"><b>Password</b></label>
        <input type="password" placeholder="Enter Password" name="psw" oninput="checkPassword()" required>
        <div class="conditions">
            <ul>
                <li class="condition">includes uppercase letter</li>
                <li class="condition">includes lowercase letter</li>
            </ul>
            <ul>
                <li class="condition">includes a digit</li>
                <li class="condition">includes a special character</li>
            </ul>
        </div>
        <label for="confirmPsw"><b>Confirm Password</b></label>
        <input type="password" placeholder="Confirm Password" name="confirmPsw" oninput="checkPasswordMatch()" required>
        <span id="passwordMatchMessage"></span>
        <br>
        <?php if(isset($error)):?>
            <span class="error"><?=$error?></span>
            <br>
        <?php endif; ?>
        <button type="submit">Register</button>
        <br>
    </form>
    
</div>