summaryrefslogtreecommitdiff
path: root/www/login.php
diff options
context:
space:
mode:
authoroweissbarth2014-03-11 01:41:59 +0100
committeroweissbarth2014-03-11 01:42:11 +0100
commit1ffaaf2be9fb2e287ff0ec1c058bfde0e55c99e7 (patch)
tree79550e75e56a1a014d700a6943f330308d7236ca /www/login.php
parentae883d064bed43817b833f3af0ad464b1c5b759e (diff)
downloadfiles.iamfabulous.de-1ffaaf2be9fb2e287ff0ec1c058bfde0e55c99e7.tar.gz
Added login error handeling
Diffstat (limited to 'www/login.php')
-rw-r--r--www/login.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/www/login.php b/www/login.php
index fbb6356..91ef46e 100644
--- a/www/login.php
+++ b/www/login.php
@@ -18,8 +18,15 @@
<div class="login-area">
<h1 class="login-area"> Log in </h1>
+ <?php if(isset($_GET['username'])){
+ echo '<h1 id="login-error"> Invalid username or password </h1>';
+ }?>
<form id="login-form" method='post' action='/login'>
- <input type="text" placeholder="username" name="username" id="username-input" class="login-input">
+ <?php if(isset($_GET['username'])){
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input" value="'.$_GET['username'].'">';
+ }else{
+ echo '<input type="text" placeholder="username" name="username" id="username-input" class="login-input">';
+ }?>
<input type="password" placeholder="password" name="password" id="password-input" class="login-input">
<input type="submit" name="login" id="button-input" class="login-input" value="login">