Assignment #3 - Sessions, Reading and Writing to Files
Due Date: October 25, 2006
Value: 15 points total
- Send the instructor an e-mail containing the URL for the first half of the assignment. email@example.com.
- Post an e-mail to the class list containing the written part of the assignment (part 2). Use the following subject line: Your Name - Assignment 4
Part 1 (12 pts)
Using a series of PHP pages with HTML develop the following functionality:
place that file in the assignment directory. You will be reading and appending to that file for this assignment.
- create a file called MEMBERSHIP_FILE
- in that file place the following information:
- upon entry to the page, start or resume a session ID.
Note: The session ID will be used to retain who the user is as they move between the different pages of this assignment and using session variables to track various states (have they loggedin ?, etc).
- The entry page will present a group or store front (of your own creation). Graphics, What we do, etc.
- It will provide the user with the following links.
- New Member
- Membership Information
New Member Page(s)
- Present the user with a form asking for
- First Name
- Last Name
- e-mail address
- present a link back to the first page.
- upon form submission
- Check to ensure all fields have been entered
- then check the above fields against the MEMBERSHIP_FILE (using the read file commands)
- If all three fields exist in an entry stored in MEMBERSHIP_FILE, then inform the user that they are already a member and provide them a link to the membership information page.
- if they are not in the MEMBERSHIP_FILE
- Generate a password (it doesn't have to be secure for this assignment)
- append to the MEMBERSHIP_FILE the new members information in the format as provided for at the top of the assignment. First Name, Last Name, e-mail Address, and the password you just assigned -- all seperated by commas.
- present the user with a page thanking them for joining and inform them what their new password is.
- provide them with a link to home or to the membership information page
Membership Information Page(s)
- if the session ID variable to indicate logged in or not shows that the user has already entered a password, then display the membership information and skip the rest of this task.
- If not already logged in, then ask for the users First Name, Last Name, and Password
- Check the MEMBERSHIP_FILE for that information
- If it exists in the MEMBERSHIP_FILE, set a sesson ID variable to indicate that the user is logged in and then display a page that shows all the information in the file for that user
- If the First and Last Name match, but the password is wrong, say that the password is incorrect and provide a link to the password help page. Save the First and Last Name to session ID variables.
- If first and last name do not exist, give the user an option of going to the new member page or home.
Password Help Page(s)
- Ask the user for their e-mail address
- check the e-mail, first and last names (from session ID variable) and if they all match one in the MEMBERSHIP_FILE provide a page with the password for the user's entry.
- If it doesn't exist in the MEMBERSHIP_FILE provide a page that says sorry not in the membership file and provide a link to home or new member.
Test Data:1) Login in as Greg Jones with correct password, 2) Login in as Gerald Jones with incorrect password, 3) create new user, 4) other input as necessary to test all functions of the code
Output:1) display user information, 2) provide e-mail help and then be able to get to display, 3) generates entry in file, 4) code should work correctly.
Expected Code: Student defined
Part 2 (3 pts)
- Locate and read, from any professional journal, two articles relevant to the area of database use in dynamic web systems. Write a two paragraph review for each article. The 1st paragraph should describe the contents of the article. The 2nd paragraph should be your reaction to the article. Do not forget to include the reference cite. Use APA format.
- Reply to at least three postings in a meaningful manner. Be sure to include
your name in the subject line like: Re: There Name - Assignment #3 - Your Name