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! Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.