-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchatroom.php
More file actions
66 lines (39 loc) · 1.03 KB
/
chatroom.php
File metadata and controls
66 lines (39 loc) · 1.03 KB
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
59
60
61
62
63
64
65
66
<?php
session_start();
if( isset($_SESSION['username']) &&
isset($_SESSION['groupCode'])&&
isset($_SESSION['currentG'])
)
{
$username = $_SESSION['username'];
$currentG = $_SESSION['currentG'];
$_COOKIE['username'] = $_SESSION['username'];;
//On page 2
}
if (isset($_POST["myButton"]))
{
$_SESSION['username']=$_COOKIE['username'];
$_SESSION['currentG']= $currentG;
echo "<script type=\"text/javascript\">";
echo "location.replace(\"endSession2.php\")";
echo "</script>";
}
?>
<html>
<head>
<title>Chat room</title>
<script>
function end() {
var username = '$username';
//location.replace("endSession2.php?username=" +username);
location.replace("thanks.php?username=" +username);
}
</script>
</head>
<FRAMESET cols="10%, 80%">
<FRAMESET rows="*,200">
<FRAME id='f1' src="sidebar.php">
</FRAMESET>
<FRAME id='f2' src="newmessage.php">
</FRAMESET>
</html>