Forms

Chapter 5

Processing Forms

Setting up CGI-BIN scripts on rosemary.umw.edu

processing a form using perl

processing a form using PHP

Homework:

The first two are two are due on Wednesday, and the last three on Thursday.

1. In the program we wrote in Perl we used a regular expression to check for invalid characters in an email address. Find or derive a regular expression to check to see if a string represents an email address in proper form. Write an explanation of how it determines whether each of the following is valid email address:

2. Modify the perl script for the membership so that the names of the selected thank-you gift(s) is/are displayed in the Web page thanking someone for his support and included in the email message. The source for the membership form, the accompanying image, and the stylesheet is on rosemary in /users/ernie/public_html/trierra/membership/

3. Modify the php script we used to process the membership form so it checks to see that only lifetime members may select more than one gift. The source for the membership form, the accompanying image, and the stylesheet is on rosemary in /users/ernie/public_html/trierra/membership/

4. Modify any of the scripts we’ve provided in this chapter so that it is required for someone to enter an email address. If the form is submitted with no email address then send a Web page back to the client with a statement that says an email address is required, and ask the user to go back to the form to fill in an email address. Test your script to see that it works properly.

5. Access and install the guestbook program available from Matt’s Script archives, http://www.scriptarchive.com/guestbook.html. Provide a link to the working guestbook.

 


Creative Commons License. Creative Commons License
This work is licensed under a Creative Commons License.
Ernest Ackermann Department of Computer Science, Mary Washington College
CPSC 104 | CPSC 220 | CPSC 321
This page was last modified on .