34 lines
971 B
PHP
34 lines
971 B
PHP
<?php
|
|
session_start();
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|
$username = $_POST['username'];
|
|
$password = $_POST['password'];
|
|
|
|
// Beispielauthentifizierung, ersetzen Sie dies durch Ihre eigene Logik
|
|
if ($username === 'admin' && $password === 'password') {
|
|
$_SESSION['user'] = 'admin';
|
|
header("Location: upload.php"); // Weiterleitung zum Upload-Skript
|
|
exit;
|
|
} else {
|
|
echo "Ungültige Anmeldedaten.";
|
|
}
|
|
}
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Login</title>
|
|
</head>
|
|
<body>
|
|
<form action="login.php" method="post">
|
|
<label for="username">Benutzername:</label>
|
|
<input type="text" name="username" id="username" required><br>
|
|
<label for="password">Passwort:</label>
|
|
<input type="password" name="password" id="password" required><br>
|
|
<input type="submit" value="Login">
|
|
</form>
|
|
</body>
|
|
</html>
|