VALUES is the data that will be recorded in the table. First we enter the name of the table after the VALUES variable (This is obtained from the forums).
$sql="INSERT INTO forma (username) VALUES ('переменная')";
XXX.php:
if(isset($_POST['otpravka'])) { //Принимаем отплавленное с форума $imya = $_POST['username']; $familya = $_POST['surname']; $soobshenie = $_POST['message']; $sql="INSERT INTO forma (username, surname, message) VALUES ('$imya', '$familya', '$soobshenie')"; }
form.html:
<form action="ХХХ.php" method="post" name="form"> <p><input type="text" name="username" placeholder="Введите имя"></p> <p><input type="text" name="surname" placeholder="Введите фамилию"></p> <textarea type="text" name="message" placeholder="Введите Сообщение"></textarea> ... <p><input type="submit" name="otpravka" value="Отправить"></p>
http://www.quizful.net/post/simplest-form-html-css
Start with YouTube to find out how to learn PHP quickly.