Chapter Questions
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. trueb. false
Which of the following form elements can be used to display a set of predefined choices on a form?a. check boxesb. option buttonsc. selection listd. All of the above.
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. trueb. false
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";
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.
You can use the __________ module to send e-mail from a script.a. Mail::Sendmailb. Sendmail::Mailc. Mail_Sendmaild. Sendmail_Mail
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.
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;
9.When using the module from Question 6, which of the following keys is associated with the e-mail message itself?a. Emailb. Emsgc. Messaged. Msg
The name of a hidden field must begin with the letter H followed by an underscore.a. trueb. false
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?
A ___________ is a list box from which the user can select one or more values.
In what way does a hidden field differ from other form elements?
Write a Perl statement that creates a hidden field whose key and value are H_city and Boston, respectively.
Write a Perl statement that creates a hidden field whose key and value are H_city and San Diego, respectively.
Write a Perl statement that creates a hidden field whose key is H_city and whose value is the contents of the $city variable.
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.
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.
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.
What does SMTP stand for?