26. When you use form-based authentication in PHP, you can include two files at the top of each
protected page. The first gets a secure connection, and the second
a. asks for the username and password
b. tests whether the $_SESSION array indicates that the user has been validated
c. compares the password in the $_SESSION array with the password in the database
d. decrypts the username and password that's in the database
27. Which of the following is a PHP function used to encrypt a password?
a. encrypt()
b. password_hash()
c. password_encrypt()
d. encrypt_string()
28. In PHP, gaps can be introduced into an array in all of the ways that follow, except one. Which one is
it?
a. add a new element with an index that's beyond the next one that's available
b. store an empty value in an array
c. delete or unset an element from an array
d. store a NULL value in an array
29. When you create a PDO object, you have to pass all but one of these arguments to it: Which one is
it?
a. Data source name
b. Server name
c. User name
d. Password
30. You can deal with gaps in an PHP array in all but one of the following ways. Which one is it?
a. Use the array_values() function to remove all gaps and re-index the array.
b. Use a foreach loop to process the array, which skips elements that contain nulls.
c. Use a for loop that contains extra code that skips elements that contain nulls.
d. Use the array_fill() function to replace all gaps in the array with empty strings.