Files
12IT_Lernfeld12_2026/Abgabe_Mohr/view/login/index.php
T
2025-12-04 23:37:05 +01:00

49 lines
1.9 KiB
PHP

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100 flex items-center justify-center min-h-screen">
<div class="bg-white shadow-md rounded-lg p-8 w-full max-w-md">
<h2 class="text-2xl font-bold mb-6 text-center">Login</h2>
<?php if(!empty($errors)): ?>
<div class="mb-4 p-3 bg-red-100 text-red-700 rounded">
<?php foreach($errors as $error): ?>
<div><?= htmlspecialchars($error) ?></div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<form action="#" method="POST" class="space-y-5">
<div>
<label for="email" class="block text-sm font-medium text-gray-700">E-Mail</label>
<input type="email" id="email" name="email" required
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500"
value="<?= isset($_POST['email']) ? htmlspecialchars($_POST['email']) : '' ?>">
</div>
<div>
<label for="passwort" class="block text-sm font-medium text-gray-700">Passwort</label>
<input type="password" id="passwort" name="passwort" required
class="mt-1 block w-full px-4 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500">
</div>
<button type="submit" name="submit"
class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition duration-200">
Einloggen
</button>
</form>
<p class="mt-6 text-center text-sm text-gray-600">
Kein Konto? <a href="<?= PROJEKT_URL ?>/Login/registrieren" class="text-blue-600 hover:underline">Registrieren</a>
</p>
</div>
</body>
</html>