Chat Improvements

Is there a chat, what can I add to it? Thanks in advance!

Chat itself:

<iframe name='chatWindow' id='chatWindow' src ="iframe.php" width="1265" height="400"></iframe>   
<form action="iframe.php" method="post" id="form" target='chatWindow' >
<p>:<input name="message" type="text" size="75" maxleght="255">
<input name="submit" type="submit" value="OK">

And this is an iframe:

<script type="text/javascript">
    setTimeout("window.location.reload()",15000); //    15 
</script>

and

<?php
  if (isset($_POST['message'])) {
      $message = $_POST['message'];
  }
  $db = mysql_connect("...", "...", "...");
  mysql_select_db("...", $db);
  if (trim($message) != "") {
      mysql_query("INSERT INTO messages (message) VALUES ('$message')");
  }
  $result = mysql_query("SELECT * FROM messages");
  while ($row = mysql_fetch_array($result)) {
      echo "<br>";
      echo "{$row['message']}";
  }
?>

And the chat script:

<script>
    jQuery(function ($) {
        $("#form").onsubmit(function (event) {
            var message = $("input[name='message']", form).value()
            if (message) {
                event.preventDefault();
                return false;
            }
            return true;
        });
        $("#form input[name='message']").bind('change keydown keypress', function (event) {
            var text = $(this).value().replace(/^\s+/, "").replace(/\s+$/, "");
            $("#form input[type='submit']").prop("disabled", text == "");
        });
    });
</script>

Answer 1, authority 100%

Let’s play fortune teller:
1) Emoticons (Vlad’s question: how to add emoticons to the chat?!!!php, mysql)
2) Functions of moderators and rating (Vlad’s question: How to add a moderator to the chat? php, mysql)
3) Rooms, personal design (Vlad’s question: How to separate user templates and make a secure theme editor? php, mysql, html, css)


Answer 2, authority 50%

Your first (and very quick!) move should be to change the password on the database. Here is the output of your code

$result = mysql_query("SELECT * FROM messages");
  while ($row = mysql_fetch_array($result)) {
      echo "<br>";
      echo "{$row['message']}";
  }


     !

Seriously, anyone with enough points, edit his question, no one knows when Vlad will be here (I’m missing a bit).