How to record text from input s to txt file?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
50 views
Hello dear experts, there is a question.
As of 2 input s to transmit the text in php and write to a txt file?
Maybe there are some articles or code samples?
by | 50 views

2 Answers

0 like 0 dislike
0 like 0 dislike
About forms and PHP php.net/manual/ru/tutorial.forms.php

You need to create an HTML form, the action which must lead into your PHP script.

When sending the form with GET method data can be retrieved in PHP from the $_GET array. (POS $_POST array).

The names of array indices with the data will match the names of the input fields of the form.

For example, the value entered in the field:


Will be available (when sending by POST method):
$_POST['inptName']

Further the string can be saved to a file, e.g. with php.net/manual/ru/function.file-put-contents.php
by

Related questions

0 like 0 dislike
3 answers
asked Apr 13, 2019 by XOPEK_32
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users