<?php
include"db_con.php";
$us_id = trim(mysql_real_escape_string(htmlspecialchars($_SESSION['us_id'])));
$us = trim(mysql_real_escape_string(htmlspecialchars($_SESSION['us'])));
$mess = trim(mysql_real_escape_string(htmlspecialchars($_POST['mess'])));
if($mess)
{
mysql_query("INSERT INTO `mail` SET
`user_id`='".(int)$us_id."',
`user`='".$us."',
`date`='".date('d.m.Y, H:i')."',
`content`='$mess'");
}
?>