如何将html表单数据导出到json文件 [英] how to Export html form data to json file
问题描述
如何将html注册表格数据保存到json文件中,然后基于它登录
无需使用任何服务器端脚本语言.
仅使用javascript,jquery
html文件简单形式"包含:
名,中间名,姓氏,用户名,密码,确认密码,电子邮件,电话
我想当用户输入数据并单击注册按钮时,他的数据将保存在json文件中
肯定在服务器上
我在"C:\ inetpub \ wwwroot \ usersData.txt"之前在服务器上创建了这个json文件.
-----------------------------------
并基于此文件"usersData.txt",当另一个用户想要再次注册时,我需要在此json文件"usersData.txt"中检查该用户名是唯一的,如果它是唯一的用户名,则将其数据保存在json文件,反之亦然
-----------------------------------
最后,当我使用change_password()JS函数时,我想如何更新此json文件中的密码
请我迅速需要帮助
预先感谢v.
how to save html registration form data into json file then login based on it
without using any server side scripting languages.
just with javascript, jquery
html file "simple form" contains:
First Name, Middle Name, Last Name, User Name, Password, Confirm Password , E-Mail, Phone
i want when user enters his data and click register button, his data will be saved in json file
surely on the server
i have created this json file on the server before "C:\inetpub\wwwroot\usersData.txt"
-----------------------------------
and based on this file "usersData.txt", when another user want to register again, i need to check in this json file "usersData.txt" that user name is unique, if it is a unique user name, save his data in the json file and vice versa
-----------------------------------
finally, i want to how to update the password in this json file when i use change_password() JS function
please i need the help quickly
Thanks v.much in advance
推荐答案
JSON,使用平面文件存储登录信息是一个非常糟糕的设计.数据库已经存在了一段时间.您应该阅读有关它们的信息.
JSON or not, using a flat file to store login information is a very poor design. Databases have been around for quite some time. You should read about them.
好的,先生,我完全同意您的意见,但出于其他目的,我需要它
如果可以的话,请帮助我
ok sir, i totally agree with you, but i need it for another purpose
if i can do this, plz help me
这篇关于如何将html表单数据导出到json文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!