Учусь по книге "Изучаем PHP и MySQL" Такой вопрос есть форма Код (Text): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Космические пришельцы похишали меня - сообщение о похищении</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <h2>Космические пришельцы похишали меня - сообщение о похищении</h2> <p>Расскажите вашу историю похищения космическими пришельцами:</p> <form method="post" action="report.php"> <label for="firstname">Имя:</label> <input type="text" id="firstname" name="firstname" /><br /> <label for="lastname">Фамилия:</label> <input type="text" id="lastname" name="lastname" /><br /> <label for="email">Ваш адрес электронной почты?</label> <input type="text" id="email" name="email" /><br /> <label for="whenithappened">Когда это произошло?</label> <input type="text" id="whenithappened" name="whenithappened" /><br /> <label for="howlong">Как долго вы отсутствовали?</label> <input type="text" id="howlong" name="howlong" /><br /> <label for="howmany">Сколько их было?</label> <input type="text" id="howmany" name="howmany" /><br /> <label for="aliendescription">Опишите их:</label> <input type="text" id="aliendescription" name="aliendescription" size="32" /><br /> <label for="whattheydid">Что они делали с вами?</label> <input type="text" id="whattheydid" name="whattheydid" size="32" /><br /> <label for="fangspotted">Видели ли вы мою собаку Фэнга?</label> Да <input id="fangspotted" name="fangspotted" type="radio" value="yes" /> Нет <input id="fangspotted" name="fangspotted" type="radio" value="no" /><br /> <img src="fang.jpg" width="100" height="175" alt="Моя собака Фэнг" /><br/> <label for="other">Дополнительная информация</label> <textarea id="other" name="other"></textarea><br /> <input type="submit" value="Сообщение о похищении" name="submit" /> </form> </body> </html> Есть php - сценарий Код (Text): <html> <head> <title>Космические пришельцы похищали меня - сообщение о похощении</title> <meta charset="utf-8"> </head> <body> <h2>Космические пришельцы похищали меня - сообщение о похощении</h2> <?php $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $when_it_happened = $_POST['whenithappened']; $how_long = $_POST['howlong']; $how_many = $_POST['howmany']; $alien_description = $_POST['aliendescription']; $what_they_did = $_POST['whattheydid']; $fang_spotted = $_POST['fangspotted']; $email = $_POST['email']; $other = $_POST['other']; $dbc = mysqli_connect('localhost','root','root', 'aliendatabase') or die ('Ошибка соединения с MySQL-сервером'); $query = "INSERT INTO aliens_abduction (first_name, last_name, when_it_happened, how_long, " . "how_many, alien_description, what_they_did, fang_spotted, other, email) " . "VALUES ('$first_name', '$last_name', '$when_it_happened', '$how_long', '$how_many', " . "'$alien_description', '$what_they_did', '$fang_spotted', '$other', '$email')"; $result = mysqli_query($dbc, $query) or die ('Ошибка при выполнении запроса к базе денных.'); mysqli_close($dbc); echo 'Спасибо за заполнение формы.<br>'; echo 'Вы были похищены' . $when_it_happened; echo ' и отсутствовали в течение ' . $how_long . '<br>'; echo 'Количество космических пришельцев: ' . $how_many . '<br>'; echo 'Опишите их: ' . $alien_description . '<br>'; echo 'Что они делали? ' . $what_they_did . '<br>'; echo 'Видели ли вы мою собаку Фэнга?' . $fang_spotted . '<br>'; echo 'Дополнительная информация: ' . $other . '<br>'; echo 'Ваш адрес электронной почты ' . $email; ?> </body> </html> Оба файла имеют кодировку UTF-8, таблица и БД utf8_general_ci. После отправки формы в БД одни закорючки как это исправить???