There is a form in the form of login, email, message. After the introduction, the handler does its work, but does not enter anything in the database. But, if you display a variable on the screen, they are displayed. The same query, but with different values works fine on another page. What is the problem?
In the database field: ID(ai)
, FROM
, MESSAGE
, EMAIL
, WHOM
.
Code:
<?php $from = trim($from); $ban_email = trim($ban_email); $text_banned = trim($text_banned); echo $from ,$ban_email,$text_banned ; $result = mysql_query("INSERT INTO messages (from,message,whom,email) VALUES ('$from','$text_banned','$from','$ban_email')"); ?>
from
([I won’t explain where it is usually used] [1]) [1]: dev.mysql.com/doc/refman/5.0/en/select.html - Vfvtnjd