Need to make sure that when you click on a button, the data from the form is saved to a document?

Closed due to the fact that the essence of the question is incomprehensible by the participants Max Mikheyenko , Alex , Cerbo , user185447 , nörbörnën Oct 20 '15 at 22:11 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

    1 answer 1

    To do this, you need to pull the data out of the form using PHP. If you use the POST method, then:

    <form method='post'> // типа форма с методом POST <input type='text' name='info'> // текстовое поле <input type='submit' name='submiter'> // кнопка отправки на сервер </form> 

    -

     <?php if(isset($_POST['submiter'])) // если отправили форму...то { $info = $_POST['info']; // получаем значение текстового поля и.. $f = fopen('file.html','a+'); // открываем файл для записи в конец =) fputs($f,$info); // записываем текстовое значение поля в файл fclose($f); // закрываем файл. } ?> 

    Although everything will be exactly the same for the GET method, only use the array not $_POST , but $_GET =)