well I am doing the http://phpbuilder.com/columns/mhall20000621.php3
tutorial...I am not even sure I am doing it right... because I am not sure if I put all the code in chat.php...here is my chat.php file:
<!-Input form-!>
<form action="chat.php" method="post">
Name: <input type="text" name="name"><br>
Mesage: <input type="text" namr="message"<br>
<input type="submit" value="Send">
</form>
<!-End of input form-!>
<!-Reads Messages-!>
<?php
$message_array=file("messages.html");
for ($counter = 1; $counter<10; $couter++){
$old_messages .= $message_array[$counter];
}
?>
<!-Tells what then new messages are!->
<?php
$new_message="$name : $message<br>\n";
?>
<!-header info-!>
<?php
$header ="<html><head><meta http-equiv=\"refresh\" content\"8\">".
"<meta name=\"robots\" content=\"noindex\"></head>".
"<body bgcolor=\"#000000\" text=\"#ffffff\"\n;
?>
<!-footer info-!>
<?php
$footer = "<p align=\"center\"><font color=\"#000000\">".
"© mystuffwashere</font></p></body></html>
?>
<?php
$open_file=fopen("messages.html","w");
fputs($open_file, $header);
fputs($open_file, stripslashes($new_message));
fputs($open_file, $old_messages);
fputs($open_file, $footer);
fclose($open_file);
?>