First Implementation
This commit is contained in:
+36
-19
@@ -1,11 +1,15 @@
|
||||
<?php
|
||||
session_start();
|
||||
require_once "includes/UserDAO.php";
|
||||
|
||||
if (!isset($_SESSION["user"])) {
|
||||
header("Location: index.php?pfad=login");
|
||||
exit();
|
||||
}
|
||||
|
||||
$dao = new UserDAO();
|
||||
$user = $dao->findUser($_SESSION["user_email"]);
|
||||
?>
|
||||
|
||||
<!--
|
||||
Content: Profil
|
||||
Inhalt: Das eigene Profil, wenn man angemeldet ist. Dort hat man die Möglichkeit seine Angaben zu ändern.
|
||||
@@ -14,27 +18,34 @@ if (!isset($_SESSION["user"])) {
|
||||
<main class="form-page">
|
||||
|
||||
<div class="form-container">
|
||||
<form>
|
||||
|
||||
<label class="input-label">Vorname</label>
|
||||
<h1>Mein Profil</h1>
|
||||
|
||||
<input type="text" name="Vorname" class="login-input" required
|
||||
placeholder="Vorname"
|
||||
value="<?php //DB-Daten ?>">
|
||||
<form method="post" action="index.php?pfad=profile">
|
||||
|
||||
<label class="input-label">Nachname</label>
|
||||
<input type="text" name="Nachname" class="login-input" required
|
||||
placeholder="Nachname"
|
||||
value="<?php //DB-Daten ?>">
|
||||
<label class="input-label">Name</label>
|
||||
<input type="text"
|
||||
name="username"
|
||||
class="login-input"
|
||||
required
|
||||
placeholder="Name"
|
||||
value="<?php echo htmlspecialchars($user["username"]); ?>">
|
||||
|
||||
<label class="input-label">Email-Adresse</label>
|
||||
<input type="email" name="Email" class="login-input" required
|
||||
<input type="email"
|
||||
name="email"
|
||||
class="login-input"
|
||||
required
|
||||
placeholder="mustermann@web.de"
|
||||
value="<?php //DB-Daten ?>">
|
||||
value="<?php echo htmlspecialchars($user["email"]); ?>">
|
||||
|
||||
<label class="input-label">Passwort</label>
|
||||
<input type="password" name="Passwort" class="login-input"
|
||||
required placeholder="Passwort">
|
||||
<input type="password"
|
||||
name="password"
|
||||
class="login-input"
|
||||
required
|
||||
placeholder="Passwort"
|
||||
value="<?php echo htmlspecialchars($user["password"]); ?>">
|
||||
|
||||
<br>
|
||||
|
||||
@@ -42,13 +53,19 @@ if (!isset($_SESSION["user"])) {
|
||||
Speichern
|
||||
</button>
|
||||
|
||||
</form>
|
||||
|
||||
<br>
|
||||
|
||||
<a href="index.php?pfad=deleteAccount" class="login-button">
|
||||
Account löschen
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<button type="button" class="login-button">
|
||||
Account löschen
|
||||
</button>
|
||||
|
||||
</form>
|
||||
<a href="index.php?pfad=logout" class="login-button">
|
||||
Abmelden
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
Reference in New Issue
Block a user