forked from IvanoAlvino/ChatRoom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.php
More file actions
38 lines (28 loc) · 985 Bytes
/
chat.php
File metadata and controls
38 lines (28 loc) · 985 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
<?php session_start();
?>
<html>
<head>
<title>Web chat</title>
<style type="text/css" media="screen"></style>
<script src="manageChat.js"></script>
<link rel="stylesheet" type="text/css" href="chat.css">
</head>
<body onload="javascript:startChat();">
<div class="jumbotron">
<h2>HomSpace Chat</h2>
<div id="status">
</div>
<!-- web chat -->
<div id="div_chat" class="chat">
</div>
<br>
<!-- text message and send button -->
<form id="input" class="input" name="input" onsubmit="return manageEnter();">
<input type="text" id="message" name="message" style="width: 460px; height: 30px" />
<input type="button" id="send_chat" name="send_chat" value="Send" onclick="javascript:sendMessage()"/>
</form>
</div>
<!-- hidden values, they are passed to javascript js file -->
<input type="hidden" name="user_name" id ="user_name" value="<?php echo $_SESSION['username']; ?>"/>
</body>
</html>