The first step in chatting is to have an identity. That requires a rudimentary login
page, such as the one shown in Listing 1.
Listing 1. index.html
<html>
<head><title>Chat Login</title></head>
<body>
<form action="chat.php" method="post">
Username: <input type="text" name="username">
<input type="submit" value="Login">
</form>
</body>
</html>
|
In Figure 1, you can see a screenshot of this page.
Figure 1. The login window for the chat
Note: I only need this for the example, because I want to
determine who's saying what. For your application, you probably already have a
login, so you can use your existing user name.