diff options
Diffstat (limited to 'www/login.php')
| -rw-r--r-- | www/login.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/www/login.php b/www/login.php index 91ef46e..8534887 100644 --- a/www/login.php +++ b/www/login.php @@ -18,16 +18,18 @@ <div class="login-area"> <h1 class="login-area"> Log in </h1> - <?php if(isset($_GET['username'])){ + <?php if(isset($_GET['reason']) && $_GET['reason'] == 'failure' && isset($_GET['username'])){ echo '<h1 id="login-error"> Invalid username or password </h1>'; + }elseif(isset($_GET['reason']) && $_GET['reason'] == 'logout'){ + echo '<h1 id="logout-message"> Sucessfully logged out.</h1>'; }?> <form id="login-form" method='post' action='/login'> - <?php if(isset($_GET['username'])){ - echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'">'; + <?php if(isset($_GET['reason']) && $_GET['reason'] == 'failure' && isset($_GET['username'])){ + echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'"required>'; }else{ - echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input">'; + echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" required>'; }?> - <input type="password" placeholder="password" name="password" id="password-input" class="login-input"> + <input type="password" placeholder="password" name="password" id="password-input" class="login-input" required> <input type="submit" name="login" id="button-input" class="login-input" value="login"> <a href="recover-password.php" id="recover-password-link">recover password</a> |
