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); Link to comment https://forums.phpfreaks.com/topic/77198-create-different-text-files/ Share on other sites More sharing options...
revraz Posted November 13, 2007 Share Posted November 13, 2007 You mispelled PASSWORD here $password = $_POST['passworsd']; Link to comment https://forums.phpfreaks.com/topic/77198-create-different-text-files/#findComment-390840 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.