feat: Füge Benutzerregistrierung hinzu und verlinke im Login

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
torsten 2026-10-04 17:50:19 +02:00
parent a357d04b06
commit d0984398d1
3 changed files with 104 additions and 0 deletions

52
src/Views/register.php Normal file
View file

@ -0,0 +1,52 @@
<?php
$pageTitle = 'Registrieren';
require __DIR__ . '/partials/header.php';
?>
<h1>Registrieren</h1>
<?php if (isset($error)): ?>
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
<?php endif; ?>
<style>
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: inline-block;
width: 200px;
text-align: right;
margin-right: 10px;
}
.form-group button {
margin-left: calc(200px + 10px);
}
</style>
<form action="/index.php?page=register" method="post">
<div class="form-group">
<label for="firstname">Vorname:</label>
<input type="text" id="firstname" name="firstname" value="<?php echo htmlspecialchars($_POST['firstname'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="lastname">Nachname:</label>
<input type="text" id="lastname" name="lastname" value="<?php echo htmlspecialchars($_POST['lastname'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="email">E-Mail:</label>
<input type="email" id="email" name="email" value="<?php echo htmlspecialchars($_POST['email'] ?? ''); ?>" required>
</div>
<div class="form-group">
<label for="password">Passwort:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="password_confirm">Passwort bestätigen:</label>
<input type="password" id="password_confirm" name="password_confirm" required>
</div>
<div class="form-group">
<button type="submit">Registrieren</button>
</div>
</form>
<?php require __DIR__ . '/partials/footer.php'; ?>