HTML:
<form action="" method="post">
<div style="margin:10px;">Логин: <br><input name="login" id="author" type="text" ></div>
<span style="margin-left:10px;">Введите ваш комментарий:</span>
<div style="margin-left:10px;"><textarea name="comment" id="message" ></textarea></div>
</form>
Обработчик:
if($_POST['comment'] != '' && $_POST['login'] != ''){
$author = $_POST['login'];
$author = htmlspecialchars($author);
..различные проверки
$message = $_POST['comment'];
$message = htmlspecialchars($message);
..различные проверки
$result = q("INSERT INTO comments (author, message) VALUES ('".$author."', '".$message.")");
Причем даже если я в html напишу echo $_POST['comment']; , то все равно выведет ошибку:Notice: Undefined index: comment in....