This commit is contained in:
Richard Mikloš 2024-01-23 11:18:34 +01:00
parent 337e662705
commit 00f4d245ef
2 changed files with 3 additions and 3 deletions

@ -19,7 +19,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$_SESSION['user_isAdmin'] = $user_isAdmin; $_SESSION['user_isAdmin'] = $user_isAdmin;
// Redirect to the main domain after successful login // Redirect to the main domain after successful login
header('Location: http://watch.twip-network.org'); header('Location: / ');
exit(); exit();
} else { } else {
echo "Invalid email or password."; echo "Invalid email or password.";
@ -31,7 +31,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
?> ?>
<h2>Login</h2> <h2>Login</h2>
<form action="login.php" method="post"> <form action="" method="post">
<input type="email" name="email" id="email-field" placeholder="E-Mail" required> <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="password" name="password" id="password-field" pattern=".{3,32}" placeholder="Password" required>
<input type="submit" name="login" value="Login"> <input type="submit" name="login" value="Login">

@ -1,6 +1,6 @@
<?php <?php
session_start(); session_start();
session_destroy(); session_destroy();
header('Location: /'); header('Location: /login');
exit(); exit();
?> ?>