Fixed chat

It now has a userID again,
displays which user you are chatting withhover over user changes different background
This commit is contained in:
Lars van Hijfte
2017-01-19 11:08:55 +01:00
parent 5f7b934d2b
commit b71cf36798
9 changed files with 37 additions and 20 deletions

View File

@@ -4,10 +4,11 @@ require("connect.php");
function selectAllFriends($db, $userID) {
$stmt = $db->prepare("
SELECT
`userID`,
`username`,
IFNULL(
`profilepicture`,
'img/notbad.png'
'img/notbad.jpg'
) AS profilepicture,
`onlinestatus`,
`role`

View File

@@ -2,13 +2,16 @@
function getHeaderInfo() {
$stmt = $GLOBALS["db"]->prepare("
SELECT
`fname`,
`lname`,
`profilepicture`
`fname`,
`lname`,
IFNULL(
`profilepicture`,
'img/notbad.jpg'
) AS profilepicture
FROM
`user`
`user`
WHERE
`userID` = :userID
`userID` = :userID
");
$stmt->bindParam(":userID", $_SESSION["userID"]);
$stmt->execute();

View File

@@ -1,6 +1,6 @@
<?php
include_once("connect.php");
require_once("connect.php");
session_start();