Hello guys,
I have recently set up my own server (Redhat) and it is running php (Ver 4.2.2)
I intend to set up a php chat/notice board on my webby. Therefore, I was reading Mike Hall's tutorial (http://www.phpbuilder.com/columns/mhall20000621.php3)
I followed the instructions and when I tried to run the php, there were several problems.
My posting form is located here.....
(http://220.255.109.158/board/post.htm)
After you click submit...you will know what my problems are.....
Has it got to do with my php settings or file settings??
Please advise. (below is my php code)
<?php
//read file into an array
$message_array = file("messages.htm");
//compile the string
for($counter = 1; $counter < 10; $counter++){
$old_messages = $messages_array[$counter];
}
//New message
//$time = date("H:i");
$new_message = "<b><i>$name</i></b>" : $message<br>\n";
//$header="<html><body bgcolor="#000000" text="#ffffff">/n";
//$footer="<p align="center"><font color="#ff00ff">"</p></html>";
$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);
?>