CECS 5100

Survey of Educational Computer Languages

Fall 2004


Assignment #2 - Forms, Data Validation, Sending E-mail

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:

  • Entry page(s)
    1. The entry page will be a form that asks for the following information:
      • First Name
      • Last Name
      • Address
      • City
      • State
      • Zip
      • Phone Number
      • E-Mail Address
    2. The page will call itself to test the entries using PHP
    3. It will check for the following items
      • All fields contain information
      • Zip is only numbers
      • Phone number contains no A-Z or a-z
      • E-mail address contains a @ sign
    4. If a field does not match the above checks, then an indication will be provided in HTML for the fields that are missing something to indicate to the user that more information is required.
      Note: You could add text, add a graphic, change the color of the table cell if you are using a table for your form fields. As long as the user is given feedback as to the error and can correct it to resubmit to try again.
    5. If all the checks of the fields are correct, the page will redirect to the next task

  • Next Page(s)
    1. Tell the user that there information has been saved.
      Note: For this program we are not doing anything with the information captured in the earlier php program other than testing it. In later programs, you would before the redirect save the information to a file or into the database for later use. The other way is not to call the redirect and make the entire PHP file a recursive program (one that calls itself and based on state of the task does different things).
    2. Present the user with the option to upload a file using a form (they can enter a file or choose to skip on to the next task)
    3. Save the file uploaded into the directory of your assignment
      Note: The path on the system for assignment 2, if you repaet what we did for assignment 1, could be /home/you_account_name/public_html/assign2. On page 199 you would use that path instead of the example on line 8.
    4. after the file is saved, proceed to the next task.

  • Last Page(s)
    1. Thank the user for their upload.
    2. Present a new form asking them to e-mail you any comments.
    3. send the e-mail to the e-mail address entered by the user. If you want you include yourself as well.
    4. When the e-mail is sent, thank them again and provide a link back to your home page.
      Note: elm.cecs.unt.edu is not setup to send e-mails off campus. E-mails to on-campus accounts like gjones@unt.edu will work.

Test Data: None
Output:Defined Above
Expected Code: Student defined

Part 2 (3 pts)

  • Locate and read, from any professional journal, two articles relevant to the area of Security Issues Related to Information Captured via Web Pages. 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 #2 - Your Name