public function get_data() { //проверка на нажатие кнопки. валидация на стороне сервера if (isset($_POST['GO2'])) { $vd = new Model_Validation(); if ($vd->valid_feed()) { $name = $_POST['name']; $email = $_POST['email']; $text = $_POST['text']; $req = "INSERT INTO `feedback`(`name`, `email`, `text`) VALUES ('" . $name . "','" . $email . "','" . $text . "')"; $db = new connect_disconnect(); mysqli_query($db->connect(), $req); $db = new connect_disconnect(); header('Location: index.php?feedback'); } } }