SSP 7
A hidden field appears on the form but its data is hidden has data that is obscured by bullets or asterisks doesn't appear on the form but its data is sent to the server appears on the form with its data grayed out
doesn't appear on the form but its data is sent to the server
A/an ________________ is similar to a text field, but it can display multiple lines of text. comment area list area multi-line area text area
text area
Which method of the form appends values to the URL to pass data? GET POST ACTION APPEND
GET
Which type of input element should be used on a form when the user can select only one of the options? checkbox radio text submit
radio
The nl2br() function can be used to convert new line characters that a user has entered into a text area into ________________.   character entity HTML non-breaking spaces <br> tags a different character set
<br> tags
HTML ________________ tags are used to define the text boxes, password boxes, radio buttons, and check boxes on a form. <enter> <data> <input> <text>
<input>
Typically, you would use the ________________ if a form contains password fields or other sensitive data that you don't want to display in the URL. GET method POST method filter_input() function htmlspecialchars() function
POST method
Which of the following is a difference between the use of the echo and print statements? The echo statement converts non-string values to strings but the print statement doesn't. The parentheses are optional for the echo statement but not for the print statement. The echo statement can accept more than one string but the print statement can't. The echo statement returns a value but the print statement doesn't.
The echo statement can accept more than one string but the print statement can't.
Assume that the statements that follow get the data from a text area named comments. After these statements are executed, how will the $comments_esc variable be displayed by an echo statement? $comments = filter_input(INPUT_POST, 'comments'); $comments_esc = htmlspecialchars($comments); With character entities for both special characters and new line characters With <br> tags for new line characters With character entities for special characters With both character entities and <br> tags
With character entities for special characters
When you use the htmlspecialchars() and nl2br() functions to process a user's entry and then pass that entry to a web page, the browser will process any HTML tags that the user entered instead of displaying them display any HTML tags entered by the user instead of processing them execute any JavaScript code entered by the user ignore any line breaks entered by the user
display any HTML tags entered by the user instead of processing them
Which of the following controls can you NOT use to select more than one option? list box drop-down list check box array
drop-down list
Which PHP function converts some special characters into character entities? htmlspecialchars() convertchars() substr() double_encode()
htmlspecialchars()
Which PHP function can be used to determine if a checkbox is checked? is_checked() boolean() isset() value()
isset()
Which attribute of a form element determines how the data is passed to a file? action method submit default
method
Which optional attribute of a select element allows the user to select more than one option in a list box? size multiple morethanone plural
multiple
To group multiple radio buttons so that only one of the radio buttons can be selected at a time, which attribute of the input element must have the same value for all radio buttons in the group? checked value name id
name
Which HTML element is used to create items in a drop-down list? list item option value
option
Which HTML element is used to create a drop-down list? select list drop-down input
select
Assume that the POST method is used. Which of the following statements gets the value of the radio button that's on in the delivery group and stores it in a variable named $card_type?' <input type="radio" name="delivery" value="USPS">USPS <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS $card_type = isset($_POST['delivery'];) $card_type = isset($_POST['card_type']; $card_type = filter_input(INPUT_POST, 'delivery'); $card_type = filter_input(INPUT_POST, 'card_type');
$card_type = filter_input(INPUT_POST, 'delivery');
Which character is used to separate parameters that are appended to a URL? $ & ? =
&
How many radio buttons from the following code can be selected at any given time? <input type="radio" name="address" value="Home">Home Address <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS 0 1 2 3
2
Which character is used to separate the original URL from the parameters that are appended to it? ? & $ =
?
Assume that the second radio button in the code below has been selected by the user. When you get the value of that radio button, what will the value be? <input type="radio" name="delivery" value="USPS">USPS <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS FedEx Federal Express fedex federal express
FedEx
The htmlspecialchars() function can be used to convert some of the special characters that a user has entered into a text box or text area into ________________. HTML character entities HTML non-breaking spaces <br> tags a different character set
HTML character entities
Which type of input element should be used on a form when the user can select zero, one, or many of the options in a group? checkbox radio text submit
checkbox
