Files
WebDB/website/queries/header.php
2017-01-24 14:00:55 +01:00

22 lines
404 B
PHP

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