Files
WebDB/website/queries/header.php
Lars van Hijfte b71cf36798 Fixed chat
It now has a userID again,
displays which user you are chatting withhover over user changes different background
2017-01-19 11:08:55 +01:00

20 lines
393 B
PHP

<?php
function getHeaderInfo() {
$stmt = $GLOBALS["db"]->prepare("
SELECT
`fname`,
`lname`,
IFNULL(
`profilepicture`,
'img/notbad.jpg'
) AS profilepicture
FROM
`user`
WHERE
`userID` = :userID
");
$stmt->bindParam(":userID", $_SESSION["userID"]);
$stmt->execute();
return $stmt->fetch();
}