arnoldd99 Posted November 13, 2007 Share Posted November 13, 2007 Hi, I need to create a different text file every time a user registers. Currently every time a user registers there details are sent to "users.txt". So all user details are in the same text file. I would idealy like each text file to be named after the username registered. Here is the code currently being used: $username = $_POST['username']; $password = $_POST['password']; $data = "$username, $password /n"; $fh = fopen("users.txt", "a"); fwrite=($fh,"$data"); fclose=($fh); Quote Link to comment Share on other sites More sharing options...
revraz Posted November 13, 2007 Share Posted November 13, 2007 You mispelled PASSWORD here $password = $_POST['passworsd']; 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.