简体   繁体   中英

How to save the data selected by user in FORM to the .txt file or csv file

I have a requirement where i need to store the data selected by user into the txt file. How can i do that? My form is in html and javascript.

The only way I know how is with php. Any other server side language would work.

The following tutorial has everything you need to know about working with files using php.

http://www.tizag.com/phpT/files.php

  1. create file: http://www.tizag.com/phpT/filecreate.php
  2. write to file: http://www.tizag.com/phpT/filewrite.php be careful here. You need to choose the correct method of writing to the file depending on weather you want to add to what is already in the file or override it. To append see this: http://www.tizag.com/phpT/fileappend.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM