<?
if ($message)
{
$message = ereg_replace("rnrn", "n<P>", $message);
$date = date("l, F j Y, h:i a");
$cc=$message;
$dd=strlen($message);
$i=0;$cc="";$ff="";
while($i<=$dd)
{
$ff=substr($message,$i,20);
$cc=$cc.$ff."<br>";
$i+=20;echo "<>".$i."<>";
}
//if ($dd>=40) {$cc=$cc."echo "/n";".substr($cc,$i-40,$dd);}
$message = "<B>$name </B> -- $date<P>$cc<BR><HR>";
$fp = fopen (basename($PHP_SELF) . ".comment", "a");
fwrite ($fp, $cc);
fclose ($fp);
}
@readfile(basename(($PHP_SELF . ".comment")));
?>
<FORM method="post">
<b>Your name:</b><BR><INPUT name="name" type="text" size="55"><BR>
<b>Your comment:</b><BR><TEXTAREA name="message" rows=10 cols=55 wrap=virtual>
</TEXTAREA><BR>
<INPUT name="submit" type="submit" value="Post your comments">
</FORM>