Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
<?php
if (session_status() == PHP_SESSION_NONE) session_start();
include "includes/head.php";
include "includes/autoloader.php";
include "includes/block.php";
include "includes/filter.php";
?>
<body>
<?php include "includes/header.php";?>
<div class="login">
<!-- login -->
<form action="includes/submit.php" method="POST" class="login">
<h1>Log In</h1>
<!-- display login error / success -->
<?php if (isset($_SESSION["loginError"]))
{
if ($_SESSION["loginError"] == "none") echo "<div class='success'>Logged in as {$_SESSION["user"]["username"]}.</div>";
else echo "<div class='error'>{$_SESSION["loginError"]}</div>";
unset($_SESSION["loginError"]);
}?>
<div>
<label for="username">Username:</label>
<input type="text" name="username" placeholder="Enter your username"
<?php if (isset($_SESSION["loginData"]))
{
echo "value='{$_SESSION["loginData"]["username"]}'";
unset($_SESSION["loginData"]);
}?>>
</div>
<div>
<label for="password">Password:</label>
<input type="password" name="password" placeholder="Enter your password">
</div>
<input type="submit" name="login" value="Log In">
</form>
<!-- signup -->
<form action="includes/submit.php" method="POST" class="login">
<h1>Sign Up</h1>
<!-- display signup error / success -->
<?php if (isset($_SESSION["signupError"]))
{
if ($_SESSION["signupError"] == "none") echo "<div class='success'>Signed up as {$_SESSION["user"]["username"]}.</div>";
else echo "<div class='error'>{$_SESSION["signupError"]}</div>";
unset($_SESSION["signupError"]);
}?>
<div>
<label for="username">Username:</label>
<input type="text" name="username" placeholder="Enter a username"
<?php if (isset($_SESSION["signupData"]))
{
echo "value='{$_SESSION["signupData"]["username"]}'";
unset($_SESSION["signupData"]);
}?>>
</div>
<div>
<label for="password">Password:</label>
<input type="password" name="password" placeholder="Enter a password">
</div>
<input type="submit" name="signup" value="Sign Up">
</form>
</div>
</body>