„threadr/profile/index.php“ ändern

master
Erik 2020-02-24 09:19:56 +01:00
parent 2560ae389d
commit 9afaeeaf21
1 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,15 @@
<?php
session_start();
%NO_CHEAP_SESSION_STEALING%
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
$statement = $pdo->prepare('SELECT name FROM users WHERE id = :user_id;'); // to be replaced with optional user name off the user data table
$result = $statement->execute(array('user_id' => $_SESSION['user_id']));
$dbentry = $statement->fetch();
$username = $dbentry['name'];
?>
<html>
<head>
<title>ThreadR - Profile</title>
@ -30,7 +42,8 @@
</div>
<div class="item-2">
<ul class="list">
<center><h3><?php echo "Welcome back, $username !";?> </h3></center>
<li><center><h1><?php echo "$username"; ?> </h1></center></li>
</ul>
</div>
</div>
</html>