View file book/add.php

File size: 967B
<?php
//Автор: Waphak
//ICQ: 9988817
//Сайт: www.waphak.ru

include('config.php');
include('skin/index.php');


if ($_POST['name'] and $_POST['mess']){
$file=fopen('date/file.txt', 'a+');
$write='<div class="b"><font color="#440055">'.$name.'</font><br>'.$mess.'<br></div>';

fwrite($file, $write);
echo'<div class="c"><center>Сообщение успешно добавлено!</center></div>';

echo'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>index.html</title><meta http-equiv="Refresh" content="0; URL='.$config_site.'/'.$config_book.'/index.php"/></head><body></body></html>';

echo'<a href="index.php">Вернуться</a>';
}else{
echo'<script>
       alert("Error!!");
       </script>';

echo '<div class="b">'.$config_error.'</div><br><a href="index.php">Вернуться</a>';
}
include('skin/foot.php');
?>