The Mudcat Café TM
Thread #93749 Message #1808697
Posted By: GUEST,Jon
13-Aug-06 - 08:58 AM
Thread Name: BS: mudchat, why is there never anyone there
Subject: RE: BS: mudchat, why is there never anyone there
Off the top of my head, the simplest extension to my crude system would be.
input.php: user message input. Code:
<? if (isset($_POST["quit"])) { require("db.php"); $SQL = "INSERT INTO message (username, message) VALUES ('" . $_POST["username"] . "', 'has left the chat')"; mysql_query($SQL); header("Location: login.php"); exit; }
That might work providing a user left by clicking the "quit" button. Obviously you could etend things say with a right hand frame listing users and making queries to the database, etc.