<?php
$text = $_POST['msg_message'];
$name = $_POST['msg_from'];
$mail = $_POST['msg_mail'];
$url = $_POST['msg_url'];
$text = strip_tags($text);
$name = strip_tags($name);
$comment = '<div style="font-weight:bolder; align:center;">' .'</div>' .'<br>' .'<p style="width:340px;">' .$text .'</p>' .'<hr style="display:block; width:200px;">';
//file_put_contents('Letter.txt', $comment, FILE_APPEND);
//Запись данных в БД
$mysqli = new mysqli ("localhost","root","","GuestBook");
$mysqli -> query ("SET NAMES 'utf-8'");
$date = date('Y/m/d');
$success = $mysqli -> query ("INSERT INTO 'Users' ('Users','Date','Mail','Url','Text') VALUES ('$name','$date','$mail','$url','$text') ");
$mysqli -> close ();
header('Location: index.php');
?>
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
$q = "INSERT INTO 'Users' ('Users','Date','Mail','Url','Text') VALUES ('$name','$date','$mail','$url','$text') ";
echo $q;
$success = $mysqli -> query ("$q");