CS 101 Web Construction,
Fall 2011, Instructor: Jeffrey Horn ASSIGNMENTS
- Assignment 5 "FORMS and Server-side Scripts"
- Handed out: Wednesday,
October 19, 2011
- Due: Friday, October 28, 2011
- 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
number" game. The user
must fill out your form so that the server-side script will send an
email to you, using a "hidden" input 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:
- guess: 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.
- 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 email.
Include your best guess of the mystery number! Also, don't
forget to put "CS 101 A5" at the beginning of the SUBJECT line of
your email message! EXTRA CREDIT
CHALLENGE: 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).
Hint: use named data fields!