%REQUIRE_LOGIN%
parent
c33addca42
commit
4a6a4540bc
|
@ -1,10 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
%SET_LOGIN_VARIABLE%
|
%SET_LOGIN_VARIABLE%
|
||||||
%PLEAZE_NO_CACHE%
|
%PLEAZE_NO_CACHE%
|
||||||
%NO_CHEAP_SESSION_STEALING%
|
%NO_CHEAP_SESSION_STEALING%
|
||||||
|
%REQUIRE_LOGIN%
|
||||||
|
|
||||||
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
|
$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
|
$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']));
|
$result = $statement->execute(array('user_id' => $_SESSION['user_id']));
|
||||||
$dbentry = $statement->fetch();
|
$dbentry = $statement->fetch();
|
||||||
|
|
Loading…
Reference in New Issue