CECS 5100

Survey of Educational Computer Languages

Fall 2004


Assignment #3 - Sessions, Reading and Writing to Files

Due Date: October 12, 2004

Value: 15 points

Part 1 (12 pts)

Send the instructor an e-mail with the URL for the assignment. greg@tapr.org.

Using a series of PHP pages with HTML develop the following functionality:

    1. create a file called MEMBERSHIP_FILE
    2. in that file place the following information:
    3. place that file in the assignment directory. You will be reading and appending to that file for this assignment.

  • Entry page(s)
    1. 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).
    2. The entry page will present a group or store front (of your own creation). Graphics, What we do, etc.
    3. It will provide the user with the following links.
      • New Member
      • Membership Information

  • New Member Page(s)
    1. Present the user with a form asking for
      • First Name
      • Last Name
      • e-mail address
    2. present a link back to the first page.
    3. 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)
    1. 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.
    2. If not already logged in, then ask for the users First Name, Last Name, and Password
    3. Check the MEMBERSHIP_FILE for that information
    4. 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
    5. 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.
    6. 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)
    1. Ask the user for their e-mail address
    2. 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.
    3. 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