CS 101 Web Construction,
Winter 2012, Instructor: Jeffrey Horn ASSIGNMENTS
- Assignment 5 "FORMS and Server-side Scripts"
- Handed out: Wednesday,
March 21, 2012
- Due: Friday, March 30, 2012
- Goals:
- Design and implement a web form, as an interface to an existing
server-based script (program).
- Learn to use several different versions of the <input> form element
(i.e., text, submit, hidden, password, all of which are values for
<input>'s "type" attribute).
- Learn to be the interface between user and (script) programmer
- Details:
- Create a web page (.html file) containing a
<form> that does allows the web user to play the "secret
code" game. The user
must fill out your form so that the server-side script will send an
email to you, using a valid nmu email address for the "recipient" field.)
- The CS 101 A5 script is at
http://cs.nmu.edu/~jeffhorn/cgi-bin/A5.cgi Have your
form's action attribute point to this script, and
use "POST" for the value of the method attribute.
- Your form should ask the user for some to guess the secret
number (integer), 1-1000.
- To run the CS101 A5 script, your web page will need to send
these named data fields to the server-side script:
- secretcode: A text string with a number in
it. This will be the users guess as to the "Mystery
Number"!
- recipient: A real email address
(e.g., "jeffhorn@cs.nmu.edu"). This should be hidden.
- fullname: Your full
name.
- firstname:
Your first name.
- lastname:
Your last name.
- nmuID: Your NMU
user name (e.g., mine is "jhorn"). This is NOT your
NMU IN!
- URL: This should
be the actual, public web address for you A5 assignment (see
below)
- Note that the names above are case-sensitive.
- Put your page on the web, but use a "cryptic" (i.e.,
non-obvious) URL, so as to discourage copying by other students!
- When your form page is working, send me the URL by using your A5
form. Include your best guess of the mystery number! Instead of sending me an email
directly, try to get the server-side script to send me an email with
your URL for A5, and your name (in the body of the email message).