// ... new line...
// (stripSlashes because we don't want all
// our escape characters appearing in the
// message file)
fputs($open_file, stripslashes($new_message));
// ... old lines ...
fputs($open_file, $old_messages);
// ... and footer.
fputs($open_file, $footer);
// Close the file when you're done. Don't forget to wash your hands
fclose($open_file);
?>
So we now have a very very basic web chat. Let's look
at some of the features.
We've added a new input to the form, meaning we get
a nice new variable to play with in the script. We
read the old messages as before, but in compiling
the new one, we use a little more HTML.