Maybe I'm doing something wrong? Through the visual editor I try to add an entry to the text field in the database. Here is a piece of code
`
if (@$_POST['save'] ){ $text=$_POST['content1']; $anot=($_POST['anot']); $pole=$_POST['pole']; $titul=$_POST['titul']; if (!$text || !$pole || !$titul) { echo ("Поле не заполнено"); } else { if ( !get_magic_quotes_gpc() ){ $text=stripslashes($text); $anot=stripslashes($anot); $pole=stripslashes($pole); $titul=stripslashes($titul); } $kuda=array(); // определяем название таблицы по ИД $kuda[10]="news"; $kuda[1]="first"; $kuda[6]="stat"; if ($kuda[$id]==1 || $kuda[$id]==6){ //пишем mysql_query("INSERT INTO {$kuda[$id]} (title, nazv, text) VALUES ('{$titul}','{$pole}','{$text}')") or die (mysql_error()); echo " <script type=\"text/javascript\"> alert (\"Данные внесены\"); </script>"; } if ($kuda[10]){ mysql_query("INSERT INTO {$kuda[10]} (title, nazv, anot, text) VALUES ('{$titul}','{$pole}','{$anot}','{$ text}')") or die (mysql_error()); echo " <script type=\"text/javascript\"> alert (\"Данные внесены\"); </script>"; } else echo ("нет такого раздела"); } } `
It works through time. If the amount of input data is large but swears at all. Writes `
`You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ом. What is the problem? already checked and rechecked all that was only ((((((