• Home
  • Textbooks
  • CGI/Perl (Web Warrior Series)
  • Hidden Fields and E-mail

CGI/Perl (Web Warrior Series)

Diane Zak

Chapter 10

Hidden Fields and E-mail - all with Video Answers

Educators


Chapter Questions

01:07

Problem 1

Assume you use your browser to request a static Web page from the server. After the server delivers the page to the browser, the connection between your computer and the server is closed.
a. true
b. false

Carson Merrill
Carson Merrill
Numerade Educator

Problem 2

Which of the following form elements can be used to display a set of predefined choices on a form?
a. check boxes
b. option buttons
c. selection list
d. All of the above.

Check back soon!

Problem 3

A hidden field is so named because it does not appear on the form and its HTML tag is invisible in the form’s source code.
a. true
b. false

Check back soon!
01:16

Problem 4

Which ot the following creates a hidden field named H_book and assigns the contents of the $title variable to it?
a. print "<INPUT TYPE=hidden NAME=H_book VALUE=$title>\n" ;
b. print "<INPUT TYPE=hidden NAME=H_book VALUE="$title">\n" ;
c. print "<INPUT TYPE=hidden NAME=H_book VALUE='$title >\n" ;
d. print "<INPUT TYPE=hidden KEY=H_book VALUE=$title>\n";

Ernest Castorena
Ernest Castorena
Numerade Educator
01:48

Problem 5

Which of the following creates a hidden field named H_age and assigns the number 25 to it?
a. print "<INPUT TYPE=hidden KEY=H_age VALUE=25>\n" ;
b. print "<INPUT TYPE=hidden KEY=H_age VALUE="25">\n";
c. print "<INPUT TYPE=hidden NAME=H_age VALUE=25>\n";
d. Both a and b.

Mayank Tripathi
Mayank Tripathi
Numerade Educator

Problem 6

You can use the __________ module to send e-mail from a script.
a. Mail::Sendmail
b. Sendmail::Mail
c. Mail_Sendmail
d. Sendmail_Mail

Check back soon!
01:02

Problem 7

When using the module from Question 6, which of the following statements actually sends the e-mail? (Assume the hash that contains the information is named %mailinfo).
a. mail{ %mailinfo} ;
b. send{%mailinfo} ;
c. sendmail [ %mailinfo ] ;
d. None of the above.

Benjamin Schreyer
Benjamin Schreyer
Numerade Educator

Problem 8

When using the module from Question 6, which of the following statements assigns the sender’s e-mail address to the %mailinfo hash? The e-mail address is stored in the $add variable.
a. $mailinfo{From} = $add;
b. $mailinfo{Sender}=$add;
c. %mailinfo{From} = $add;
d. %mailinfo{Sender}=$add;

Check back soon!
01:02

Problem 9

9.When using the module from Question 6, which of the following keys is associated with the e-mail message itself?
a. Email
b. Emsg
c. Message
d. Msg

Benjamin Schreyer
Benjamin Schreyer
Numerade Educator

Problem 10

The name of a hidden field must begin with the letter H followed by an underscore.
a. true
b. false

Check back soon!
01:03

Problem 11

Why is it a good idea to use a selection list rather than a text box when you have a fixed set of possible values?

Gus Steppen
Gus Steppen
Numerade Educator
00:14

Problem 12

A ___________ is a list box from which the user can select one or more values.

Ali Soave
Ali Soave
Numerade Educator

Problem 13

In what way does a hidden field differ from other form elements?

Check back soon!
11:29

Problem 14

Write a Perl statement that creates a hidden field whose key and value are H_city and Boston, respectively.

RO
Reynald Oliveria
Numerade Educator
11:29

Problem 15

Write a Perl statement that creates a hidden field whose key and value are H_city and San Diego, respectively.

RO
Reynald Oliveria
Numerade Educator

Problem 16

Write a Perl statement that creates a hidden field whose key is H_city and whose value is the contents of the $city variable.

Check back soon!

Problem 17

Assume you are using the module from Question 6 to send e-mail from a script. Write the statement to assign the e-mail message, which is stored in the $msg variable, to the appropriate key in the %mail hash.

Check back soon!

Problem 18

Assume you are using the module from Question 6 to send e-mail from a script. Write the statement to assign the subject, which is stored in the $ subject variable, to the appropriate key in the %mail hash.

Check back soon!

Problem 19

Assume you are using the module from Question 6 to send e-mail from a script. Write the statement to send the e-mail message. The e-mail information is stored in a hash named %email.

Check back soon!
01:12

Problem 20

What does SMTP stand for?

Sanchit Jain
Sanchit Jain
Numerade Educator