View file adm/fnc/book_add.php
<? include"../sys/fnc.php"; $msg=trim(htmlspecialchars($_POST['msg'])); $name=trim(htmlspecialchars($_POST['name'])); $data=date("d.m.Y H:i"); if(($msg!="") and ($name!="")) { $f = fopen ("../../data/book.dat", "a+"); fwrite($f,"$data<>$name<>$msg\r\n"); fclose($f); echo'<font color="red">Сообщение добавлено!</font>'; } ?>