'; echo ' ';/**/ $action = filter_input(INPUT_GET, 'action'); if (1 == $action) { $str = $_POST['text']; if ($str) { //$safestr = mysqli_real_escape_string($str); $res = Yii::$app->db->createCommand() ->insert('text_log', ['msg' => $str] )->execute(); //'insert into text_log (msg) values (\'' //. $safestr . '\')')->execute(); if ($res) echo 'Записано.
'; else echo 'Не записано.
'; } } echo '

Внесите текст:


'; //echo '';