chap 7 quiz
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
display any HTML tags entered by the user instead of processing them
radio
isset()
Which character is used to separate parameters that are appended to a URL?
&
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
Which method of the form appends values to the URL to pass data?
GET
A hidden field
doesn't appear on the form but its data is sent to the server
Which PHP function converts some special characters into character entities?
htmlspecialchars()
Which attribute of a form element determines how the data is passed to a file?
method
Which optional attribute of a select element allows the user to select more than one option in a list box?
multiple
In order 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?
name
Which HTML element is used to create items in a drop-down list?
option
Which type of input element should be used on a form when the user can select only one of the options?
radio
Which HTML element is used to create a drop-down list?
select
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
2
Which character is used to separate the original URL from the parameters that are appended to it?
?
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 special characters
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
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 = filter_input(INPUT_POST, 'delivery');
