CS 312 - Internet Concepts
Fall 2011: Tues/Thurs 3-4:15pm, Dragas 1117

Print - Admin





Useful Links

Project 4 - Add Form Data to XML File

Assigned: Tuesday, November 15, 2011
Due: Tuesday, November 22, 2011 before midnight Now Due Wed, Nov 23 before midnight -MCW

The goal of this assignment is to continue working towards the final project -- a set of webpages that allow a user to manage and search a personal media collection (CDs, MP3s, DVDs, video games, etc.).


In this assignment, you will be editing your add.html page to write the entered form data to the XML file you created in Project 3. You may change the form you did for Project 2 to match the XML file you designed in Project 3, or you may change both as needed.


Note: These are the items that we will check for when grading your assignment. Each is worth 10 points, unless otherwise indicated.

  1. Allow the user to enter information into the form, with some fields being marked as required. (from Project 2)
  2. Use CSS to style the form. (from Project 2)
  3. If required fields are left blank, alert the user. (from Project 2)
  4. [20 points] If all required fields are filled in, call PHP code to write the information to the XML file.
  5. In the footer section of the add page, use JavaScript to indicate the date the page was last modified (hint: document.lastModified). This should replace the date you hard-coded in Project 1. (from Project 2)
  6. In the footer section of the add page, add a link to your XML file.
  7. After the form has been accepted and the new data has been written to the XML file, the table displayed on your home page must show the newly added item. (from Project 3)
  8. The HTML of your add page must pass XHTML 1.0 Transitional validation.
  9. The XML file (after adding an entry) must pass validation. You'll need to copy/paste your XML file into the page, using a URL won't work.

Setting Up

  1. Create a new directory under ~/public_html/cs312/ for this project
    • chmod 755 ~/public_html/cs312/new directory name
  2. Copy the files you created in Project 3 over to this directory.
  3. Make sure that the directory and file permissions allow anyone to view the files.


  • Note: Your project will be graded using the Firefox browser.
  • Edit your HTML and CSS with a simple text editor (no Word or any other fancy tools allowed).
    • examples: emacs (on Unix machines), pico (on Unix machines), Notepad++ (on CS Windows machines)
  • Remember to use tags that are acceptable for XHTML (all lowercase and include closing tags when required).
  • All work must be your own. You are not permitted to copy stylings or layouts from other sources.


Go to the Project 4 Submission page, and enter your name and the URL of your Project 4 home page (must start with http://www.cs.odu.edu/).

  • Make sure that the URL works before you submit it.
  • Only submit your URL once!