PHP Lab

Tom Kelliher, CS 318

Jan. 28, 2002

Administrivia

Announcements

Assignment

Read Chapters 1--4.

From Last Time

PHP introduction.

Outline

  1. Lab Exercises.

Coming Up

Relational data model.

Lab

  1. Do the exercise at the end of the Unix handout.

  2. Time permitting, do the following exercise: Design a form which implements a two or three question multiple choice test (Use radio boxes to select answers --- see The Bare Bones Guide to HTML. The user should input their name in a text box at the top of the form. Write a PHP script to grade the test, greet the user by name, and print the number of correct answers. Use arrays to pass the selected answers to the PHP script and to hold the list of correct answers. Hint: your radio box tags will need to be similar to:
    <input type="radio" name="ans[0]" value="A">
    
    Notice how the array used to pass the answers from the form to the processing script is indexed, unlike last time's example.



Thomas P. Kelliher
Sat Jan 26 14:05:03 EST 2002
Tom Kelliher