Care for a Dance with Perl?
GP1/[NSTRUCXN]/gp1.pdf
OVERVIEW
Now that you’ve completed all of the assignments in Lesson 1 and have read chapters 1 through 3 in your textbook, you’re ready to complete the Lesson 1 graded project. Working with CGI and Perl for processing data is an essential part of your learning foundation, so this graded project reflects those skills. Throughout this graded project, you’ll use the skills that you’ve gained throughout Lesson 1. Pay close attention to all of the instructions so that your solution will be a success. Remember to include all of the required components when you submit your solution.
BEFORE YOU BEGIN
As you progress through this graded project, you’ll be required to complete a number of tasks in order to create your solution. This graded project is based on Case Project 1 on page 77 of your textbook. For this graded project, you’ll create an HTML form and a CGI script for Lake College. The following instruc- tions have been modified to meet the requirements for the Unix server that you’ll be transferring your files to.
21
Lesson 1 Creating Your First CGI/Perl Form
EXAMINATION NUMBER:
40272900 Whichever method you use in submitting your exam
answers to the school, you must use the number above.
For the quickest test results, go to http://www.takeexamsonline.com
E xa
m in
a tio
n E
xa m
in a
tio n
INSTRUCTIONS
1. Create a HTML document named c03case1.html. Note: Your form action statement should be as follows:
<FORM METHOD="POST" ACTION="/~username/cgi-bin/c03case1.cgi">.
Also, remember to include a Submit button.
2. This HTML form will allow the user to enter the student’s name and the number of hours the student is enrolled for the semester. Reference pages 57–60 in your textbook.
3. Create a CGI script named c03case1.cgi. Reference pages 48–57 in your text- book. Note that the shebang line for the Unix server you’ll be using is as follows:
#!/usr/bin/perl
4. The CGI script should calculate the total due by multiplying the number hours enrolled by $100 and then adding the room and board fee ($1,800) to the result. Reference pages 50–57 in your textbook.
5. The script should then display the form data and the total due on a Web page. Reference pages 60–68 in your textbook.
6. Transfer the c03case1.html file in binary mode to the public_html area of your Unix server account and place it in the folder named PerlGPLesson1. You’ll need to create this folder for your project.
7. Transfer the c03case1.cgi script in ASCII mode to the cgi-bin within the public_html area of your Unix server account.
8. Set the permissions of the c03case1.cgi to 755.
9. Test your script on the server via your Web browser by typing in the following URL:
http://unix.pennfoster.com/~username/PerlGPLesson1/c03case1.html
Examination, Lesson 122
PROJECT SUBMISSION GUIDELINES
When you’ve completed your graded project, you’ll upload it to the Web hosting site. If you need help, go to http://unix.pennfoster.com/~instructions/. Send your course instructor an e-mail at [email protected] to let him or her know that you’ve submitted your project. Name the project folder 40272900.
You’ll need to transfer the HTML file within the public_html area of your Unix server account in a folder named PerlGPLesson1. The CGI script should be transferred to the cgi-bin within the public_html area. All CGI scripts should be placed directly within your cgi-bin without any folders.
GRADING CRITERIA
Your grade for this project will be based on the following items:
Student successfully created HTML form 25 points
Student successfully created the CGI script 25 points
CGI script successfully displayed the form data and the total due as instructed 25 points
Student followed instructions appropriately 5 points
Project works appropriately 20 points
Total 100 points
Examination, Lesson 1 23