I want to save the value entered in the text form on the web page to a text file so that I can use it later. How should it be done?
Answer # 1
I would like to record what words were entered in the form and use them for ranking etc.
For these applications, we recommend using adatabaserather than a text file. Since the website can be accessed at the same time, if you do notexclusive controlcorrectly, the data will be damaged, but if it is a database, exclusive control is also standard, so you can run without worry The
Answer # 2
If you want to test before preparing the database,
Download a text file (JSON.stringify or make a small CSV)
Read file using FileReader in onchange event of input [type = file]
input [type = file] for reading files
If you make it a library and read it with the script element, you can easily test it in similar cases.
The question isUse later, so if you have a lot of test data input,
Preparing the database on the server sideis certain, but I hope it will be helpful as a methodology.
Answer # 3
For later use
Isn't localstorage or cookies sufficient for reuse?Server side
What is the purpose of creating a text file?
Is it an image that each client keeps referring to on the server side?
If you can use PHP
File system functions PHP: file-ManualPlease use
Use this side for flow
Read: fopen, fread, fclose
Export: fopen, flock, fwrite, fclose
Answer # 4
If you just want to reuse it
I think that it is possible by GET or POST method of the form.
- php - how to use the realpath method
- doe on how to loop php up to the value of a variable
- i can't get the value with json_decode in php
- python 3x - how to get the value of scrolledtext
- php - i want to save the file path in mysql
- java - how to put a value in the value of the tag in
- swift - how do you save the audio?
- php - is it possible to put a variable in the form with the value attribute? 【i added】
- php - does the value exist in the database? but when i visit the details page, it returns 404 (test)
- ruby - i want to save the prototype and move the page
- php - i want to be able to use the validate function
- python - i want to save all the contents in a csv file
- c - how to get the "" part of the shader and the "" of the shader to the outside
- php - i don't understand how to specify the date
- i want you to see the error contents of php
- mql4 - how to get the start date and end date at the time of back test
- php - i would like to know how this code works
- php - i want to give the key value of a multidimensional array to the value of the array
- php - i don't know how to use try ~ catch and pdoexception