Drags111 Posted November 10, 2007 Share Posted November 10, 2007 Hello, I need to find out what I would to to create a file on my server from a personal form. Like lets say the form is like this: IdNumber: 7 Username: Drags111 Password: Password I would want the name of the file to be the idnumber (7 in this case), and the contents to be like: Username: Drags111 Password: Password Also is it possible to password protect the file when I make it? Thanks! Link to comment https://forums.phpfreaks.com/topic/76750-creating-a-file-on-my-server/ Share on other sites More sharing options...
Drags111 Posted November 10, 2007 Author Share Posted November 10, 2007 oh and i want it to be a txt file Link to comment https://forums.phpfreaks.com/topic/76750-creating-a-file-on-my-server/#findComment-388584 Share on other sites More sharing options...
rajivgonsalves Posted November 10, 2007 Share Posted November 10, 2007 this should work in PHP 5 file_put_contents($IdNumber.".txt","Username: $username\nPassword: $password"); you cannot password a text file the most you can store your username and password in encrpted format Link to comment https://forums.phpfreaks.com/topic/76750-creating-a-file-on-my-server/#findComment-388589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.