This commit is contained in:
Andreas Zweili 2017-02-05 15:16:45 +01:00
parent f10d6255db
commit 0eee588a1e
1 changed files with 12 additions and 22 deletions

View File

@ -16,22 +16,12 @@ and password='".md5($password)."'";
$rows = mysqli_num_rows($result);
if ($rows==1) {
$_SESSION['username'] = $username;
// Redirect user to index.php
// Redirect user to home.php
header("Location: home.php");
} else {
echo "<div class='form'>
<h3>Username/password is incorrect.</h3>
<br/>Click here to <a href='db/login.php'>Login</a></div>";
<br/>Click here to <a href='login.php'>Login</a></div>";
}
}
}else{
?>
<div class="form">
<h1>Log In</h1>
<form action="" method="post" name="login">
<input type="text" name="username" placeholder="Username" required />
<input type="password" name="password" placeholder="Password" required />
<input name="submit" type="submit" value="Login" />
</form>
<p>Not registered yet? <a href='registrationindex.php'>Register Here</a></p>
</div>
<?php } ?>