PHP Exam Study Guide+Questions with
100% CorrecT Answers
syntax - ANSWER Which type of error is considered the easiest to find?
syntax - ANSWER Which type of error is considered the easiest to fix?
<input> - ANSWER HTML ________________ tags are used to define the text boxes,
password boxes, radio buttons, and check boxes on a form.
drop-down - ANSWER In a/an ________________ list, only one option can be selected.
test area - ANSWER A/an ________________ is similar to a text field, but it can display
multiple lines of text.
GET - ANSWER If a form uses the ________________ method, the data for the fields is
displayed in the URL.
isset() - ANSWER To test whether a check box has been checked, you can use the
________________ function.
POST - ANSWER Typically, you would use the ________________ method if a form
contains password fields or other sensitive data that you don't want to display in
the URL.
entities - ANSWER 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 ________________. This provides a way to display special characters and
helps to guard against XSS attacks.
, <br> - ANSWER The nl2br() function can be used to convert new line entries in a text
area into HTML ________________ tags.
print - ANSWER The echo and ________________ statements are similar, but the echo
statement can accept multiple parameters.
character entity - ANSWER An HTML ________________ lets you display some special
characters on a web page.
A hidden field - ANSWER doesn't appear on the form but its data is sent to the server
2 - ANSWER 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
$card_type = filter_input(INPUT_POST, 'delivery'); - ANSWER 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
FedEx - ANSWER 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?
100% CorrecT Answers
syntax - ANSWER Which type of error is considered the easiest to find?
syntax - ANSWER Which type of error is considered the easiest to fix?
<input> - ANSWER HTML ________________ tags are used to define the text boxes,
password boxes, radio buttons, and check boxes on a form.
drop-down - ANSWER In a/an ________________ list, only one option can be selected.
test area - ANSWER A/an ________________ is similar to a text field, but it can display
multiple lines of text.
GET - ANSWER If a form uses the ________________ method, the data for the fields is
displayed in the URL.
isset() - ANSWER To test whether a check box has been checked, you can use the
________________ function.
POST - ANSWER Typically, you would use the ________________ method if a form
contains password fields or other sensitive data that you don't want to display in
the URL.
entities - ANSWER 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 ________________. This provides a way to display special characters and
helps to guard against XSS attacks.
, <br> - ANSWER The nl2br() function can be used to convert new line entries in a text
area into HTML ________________ tags.
print - ANSWER The echo and ________________ statements are similar, but the echo
statement can accept multiple parameters.
character entity - ANSWER An HTML ________________ lets you display some special
characters on a web page.
A hidden field - ANSWER doesn't appear on the form but its data is sent to the server
2 - ANSWER 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
$card_type = filter_input(INPUT_POST, 'delivery'); - ANSWER 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
FedEx - ANSWER 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?