<?php
$bookfile="guestbook.txt";
echo $new_input;
If ($new_input<>"")
write_input($new_name, $new_input,$bookfile);
read_file($bookfile);
function write_input($new_name, $new_input,$bookfile){
$fd = fopen($bookfile,"a");
fwrite ($fd, "<br><b><table width='300' background=http://www.skrabl.de/afschool/rotb.png border='0'>".$new_name.":</b></table><br><table width='300' bgcolor='#FECC45'>".$new_input."</table> \r\n");
fclose ($fd);
}
function read_file ($bookfile){
$fd = fopen($bookfile,"r");
while (!feof($fd)) {
$zeile = fgets($fd,1000);
echo $zeile . "<br>";
}
fclose ($fd);
}
?>