Vidyalelo
PHP · all questions

HTML Forms Handling
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

70

Questions

1/4

Page

Pick an option on a question to see the right answer and solution.

Which two predefined variables are used to retrieve information from forms?

Select an option to see the answer and solution.

The attack which involves the insertion of malicious code into a page frequented by other users is known as.

Select an option to see the answer and solution.

When you use the $_GET variable to collect data, the data is visible to.

Select an option to see the answer and solution.

When you use the $_POST variable to collect data, the data is visible to.

Select an option to see the answer and solution.

Which variable is used to collect form data sent with both the GET and POST methods?

Select an option to see the answer and solution.

Which one of the following should not be used while sending passwords or other sensitive information?

Select an option to see the answer and solution.

Which function is used to remove all HTML tags from a string passed to a form?

Select an option to see the answer and solution.

What will be the value of the variable $input in the following PHP code?
<?php
$input = "Swapna<td>Lawrence</td>you are really<i>pretty</i>!";
input,"<i></i>");
?>

Select an option to see the answer and solution.

To validate an e-mail address, which flag is to be passed to the function filter_var()?

Select an option to see the answer and solution.

How many validation filters like FILTER_VALIDATE_EMAIL are currently available?

Select an option to see the answer and solution.

How many predefined variables does PHP use to authenticate a user?

Select an option to see the answer and solution.

Which of the following variables does PHP use to authenticate a user?
1. $_SERVER[‘PHP_AUTH_USER’].
2. $_SERVER[‘PHP_AUTH_USERS’].
3. $_SERVER[‘PHP_AUTH_PU’].
4. $_SERVER[‘PHP_AUTH_PW’].

Select an option to see the answer and solution.

Which of the following PHP function is commonly used when handling authentication via PHP?
1. header()
2. footer()
3. inset()
4. isset()

Select an option to see the answer and solution.

Which function is used to verify whether a variable contains a value?

Select an option to see the answer and solution.

Which of the following are types of PHP authentication implementation methodologies?
1. Hard-coding a login pair directly into the script
2. File-based authentication
3. Data-based authentication
4. PEAR’S HTTP authentication

Select an option to see the answer and solution.

In which authentication method does changing the username or password can be done only by entering the code and making the manual adjustment.

Select an option to see the answer and solution.

The authentication File.txt, the file which stores username and password should be stored ________ the server document root.

Select an option to see the answer and solution.

Which function is used to split a string into a series of substrings, with each string boundary is determined by a specific separator?

Select an option to see the answer and solution.

In which of the following situations does file-based authentication become inconvenient.
1. small list
2. large number of user
3. users are being regularly added
4. static authentication

Select an option to see the answer and solution.

Which is the most powerful authentication method among the four?

Select an option to see the answer and solution.