Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   HTML / XHTML / CSS (http://www.programmingforums.org/forum27.html)
-   -   html write to .txt (http://www.programmingforums.org/showthread.php?t=13330)

jayme Jun 11th, 2007 6:35 PM

html write to .txt
 
I'm looking to create a small website with a user system and my problem is storing the user's names and passwords to a text file on the host machine. I've got a password and username form but I can't figure out how to write these to the text file once the user hits the submit button because I can't seem to find a proper html tutorial. Any help is appreciated.

DaWei Jun 11th, 2007 6:40 PM

Writing a file on the host is not an HTML task. It is a task for the server-side code, whether that be Perl, PHP, Python, or whatever.

When the form is submitted, the server sees it as a request and responds. How it responds depends on the setup. It may respond with a static page that is rendered by the browser, or it may execute a file and the executable will generate the information that is rendered by the browser.

In the second case, the executable may do a number of other things, such as communicate with files or databases on the host.

There is no answer to your question, currently, because you have given insufficient information. The web is chock-a-block with HTML tutorials, but you won't find how to write a file on the host there.

Wizard1988 Jun 12th, 2007 1:33 AM

I don't think html is cabable of reading or writing files as it is only a markup language. However JavaScript might help you accomplish your goal.

How to read and write files in JavaScript

I hope this helps:)

jayme Jun 12th, 2007 2:47 AM

I ended up using php. I had to learn a bit before I could manage to get it all working properly, but it was worth the effort and time spent. It always is..


All times are GMT -5. The time now is 2:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC