This commit is contained in:
Richard Mikloš 2024-01-20 18:23:08 +01:00
parent 3c0387f26b
commit 8a6892f6ee
4 changed files with 7 additions and 4 deletions

@ -4,7 +4,7 @@ require_once 'config.php';
// Check if user is logged in
if (!isset($_SESSION['user_id'])) {
include 'pages/login.html';
include 'login.php';
} else {
// Fetch user details
$user_id = $_SESSION['user_id'];

@ -28,4 +28,5 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Close the statement
$stmt->close();
}
include "pages/login.html";
?>

@ -12,8 +12,7 @@
<form action="../login.php" method="post">
<input type="email" name="email" id="email-field" placeholder="E-Mail" required>
<input type="password" name="password" id="password-field" pattern=".{3,32}" placeholder="Password" required>
<input type="submit" value="Login">
<button onclick="window.location.href='https://watch.twip-network.org/pages/register.html'">Register</button>
<input type="submit" name="login" value="Login">
</form>
</body>
</html>
</html>

@ -58,4 +58,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
}
}
include "pages/register.html";
?>