-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidebar.php
More file actions
58 lines (36 loc) · 825 Bytes
/
sidebar.php
File metadata and controls
58 lines (36 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html>
<head>
<meta http-equiv="refresh" content="2">
</head>
<body>
<?php
session_start();
if( isset($_SESSION['username']) &&
isset($_SESSION['groupCode'])&&
isset($_SESSION['currentG'])
)
{
$currentuser = $_SESSION['currentG'];
}
require_once 'loginScript.php';
$query ="Select *From $currentuser;";
$result = $myPDO->query($query);
if($result)
{
echo '<b>'.'Current user(s):'.'</b>'.'</br>';
$resultArray = $result->fetchAll( );
$nameArray = array_column($resultArray, 'username');
foreach ($nameArray as $name)
{
echo $name.'</br>';
}
//while($row=mysqli_fetch_row($result))
//{
// echo $row['1'].'</br>';
//}
//mysqli_free_result($result);
}
mysqli_close($conn);
?>
</body>
</html>