-
Notifications
You must be signed in to change notification settings - Fork 2
/
groups.php
51 lines (44 loc) · 1.49 KB
/
groups.php
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
<?php include("db_connect.php") ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<LINK href="stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="header">
<img src="logo.jpg"/>
</div>
<div class="body">
<table padding-left="5px" cellspacing="0">
<tr><td class="blank"></td>
<td class="tab4"><a href="home.php">home</a></td>
<td class="tab2"><a href="profile.php">profile</a></td>
<td class="tab3"><a href="calendar.php">calendar</a></td>
<td class="tab1">groups</td>
<td class="login"><font color="#ffffff">welcome! | </font><a href="logout.php"> logout</a></td>
</tr></table>
<table cellspacing="0"><tr>
<td class="content">
view groups | <a href="creategroup.php">create a group</a> | <a href="joingroup.php">join/unjoin a group</a>
<h5>
<?php
$name = $_SESSION['username'];
$query = "SELECT * FROM groups";
$result = mysqli_query($db, $query);
echo ("<h2>Existing Groups</h2>");
echo '<table border="1">';
echo("<tr><td><b>Group Name</b></td><td><b>Description</b></td></tr>");
while($row = mysqli_fetch_array($result)){
$content = $row['groupName'];
echo("<tr><td><a href='groupProf.php?group=$content'>$content</a></td>");
$content2 = $row['shortInfo'];
echo("<td>$content2</td></tr>");
}
echo "</table>";
?>
</tr></td> </form>
</h5></td></tr>
</table
</div>
</body>
</html>