mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-27 15:40:00 +01:00
20 lines
997 B
PHP
20 lines
997 B
PHP
<link rel="stylesheet" href="/style/settings.css">
|
|
<h1>Settings</h1>
|
|
<h2>User</h2>
|
|
<?php
|
|
include $_SESSION["docroot"].'/php/connect.php';
|
|
$token = $_COOKIE["token"];
|
|
$query = "SELECT username, email, last_login FROM `users` WHERE `uid` = (SELECT user FROM `sessions` WHERE `session_id` = \"$token\")";
|
|
$result = $mysqli->query($query);
|
|
$user = $result->fetch_assoc();
|
|
?>
|
|
<div class="settings">
|
|
<div class="userprofile-pane">
|
|
<div class="userprofile">
|
|
<span><font class="attribute">Benutzername</font><input class="change-attribute-input" type="text" name="username" value="<?php echo $user["username"]; ?>"></span>
|
|
<span><font class="attribute">Email</font><input class="change-attribute-input" type="text" name="username" value="<?php echo $user["email"]; ?>"></span>
|
|
<span><font class="attribute">Letzter Login</font><font><?php echo $user["last_login"]; ?></font></span>
|
|
</div>
|
|
<button class="button" id="saveButton">Speichern</button>
|
|
</div>
|
|
</div>
|