< Back

User Management

One very common task that you will undertake when programming on the web is the issue of user management. You need to be able to allow users to create accounts on your web page, so they can enter in information they wish to persist. This is usually accomplished using a database, but you don't know how to connect to (or use) a database using PHP. However, you can represent a database using a text file, such as an XML or JSON file.


Setup

Create a directory called user_accounts in your public_html directory.


Details

Write a simple PHP program that allows users to create an manage accounts for an anonymous web application. You are required to store the information for user accounts in a text file, either XML or JSON. The choice is yours, but it must store the information specified below.

Each user should have a real name (both first and last), a username (which must be unique across all users in the database, a password (stored in plaintext in the database file. Keep in mind this is bad practice, but encrypting these is beyond the scope of this class.), a birth date, and a account creation time. All of this information should be stored in your database text file.

Your application will be very simple. If a user doesn't have an account, you should have a mechanism that allows users to create a new account. It should ask for all of the pertinent information that must be stored. Make sure you check that their username is unique!

If the user has an account, they should be allowed to log in and change any of their data except username and account creation date.


Submission

You are required to submit a tar file of your user_accounts directory. This submission is to be done via email, before Dec. 9th by 10:10 AM.