I have a login script, which is pretty simple.. it utilises sessions and stores user data in a unreadable directory in textfiles. I don't know anything about databases yet so I dont want to make this script with it. What I have now is a register page, they enter a username and password to register, and it gets filled into 2 textfiles ('usernames.txt' and 'passwords.txt'). Then they are presented with the login page, here they can enter their details and this just use the strpos(); feature to look for the username/password file to see if they exist, if both username and password is in this textfile exist it place a $logged_in = yes; in their session and logs them in and will lead them to a test page I named 'secret.php'. Now I need to make a page where the registered users can enter some more of their details after they registered and logged in, something like 'edit your profile' where they can fill in name, location, age and upload a image. Can I please get some suggestions on how I can manage this? Should I use for example fwrite(); to just make alot of new textfiles containing their userdata in a unreadable directory or..? Any suggestions how I can do it? Anyone have some sample code? Greatly apprecciates all advices on this, thanks in advance.
In my opinion, you are really over complicating things by not using a database. While it may require additional time to get to know the php mysql functions and the SQL language, you will thank yourself later when you begin developing larger projects. In addition, MySQL is/can be tuned for performance. The bigger your text files get the more difficult it will be to manage them.
If you are going to stick to simple username and password storage then text files will work. However, as soon as you want to begin storing additional information for your users, you are going to want to store your data in a relational database.