chapter 7 quiz
Which character is used to separate the original URL from the parameters that are appended to it? A. ? B. & C. $ D. =
A. ?
Which method of the form appends values to the URL to pass data? A. GET B.POST C. ACTION D. APPEND
A. GET
Which type of input element should be used on a form when the user can select more than one of the options? A. checkbox B. radio C. Select the DB D. submit
A. checkbox
Which PHP function converts some special characters into character entities? A. htmlspecialchars B. convertchars C. substr D. double_encode
A. htmlspecialchars
Which HTML element is used to create a drop-down list? A. select B. list C. drop-down D. input
A. select
Which attribute of a form element determines how the data is passed to a file? A. action B. method C. submit D. default
B. method
Which optional attribute of a select element allows the user to select more than one option in a list box? A. size B. multiple C. morethanone D. localhost
B. multiple
Radio buttons in a group all have the same _____ value. A. value B. name C. checked D. all of the above
B. name
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); A. With character entities for both special characters and new line characters B. With tags for new line characters C. With character entities for special characters D. With both character entities and tags
C. With character entities for special characters
A hidden field: A. appears on the form but its data is hidden B. Has data that is obscured by bullets or asterisks C. doesn't appear on the form but its data is sent to the server D. appears on the form with its data grayed out
C. doesn't appear on the form but its data is sent to the server
