Which two predefined variables are used to retrieve information from forms?
A. GET & POST
B. _GET & _POST
C. __GET & __POST
D. GET & POST
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.
A. basic sql injection
B. advanced sql injection
C. cross-site scripting
D. scripting
Select an option to see the answer and solution.
When you use the $_GET variable to collect data, the data is visible to.
A. none
B. only you
C. everyone
D. selected few
Select an option to see the answer and solution.
When you use the $_POST variable to collect data, the data is visible to.
A. none
B. only you
C. everyone
D. selected few
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?
A. $BOTH
B. $_BOTH
C. $REQUEST
D. $_REQUEST
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?
A. GET
B. POST
C. REQUEST
D. NEXT
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?
A. remove_tags()
B. strip_tags()
C. tags_strip()
D. tags_remove()
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>!" ;
in p u t < s p an c l a ss = " p − b l u e " >= s t r i p t a g s < / s p an > ( input,"<i></i>" );
?> A. Swapna Lawrence you are really pretty!
B. Swapna Lawrence you are reallypretty !
C. Swapna Lawrence you are really pretty!
D. Swapna Lawrence you are reallypretty !
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()?
A. FILTER_VALIDATE_EMAIL
B. FILTER_VALIDATE_MAIL
C. VALIDATE_EMAIL
D. VALIDATE_MAIL
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’].
A. 1 and 2
B. 2 and 4
C. 1 and 4
D. 2 and 3
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()
A. 1 and 4
B. 2 and 4
C. 2 and 3
D. 1 and 3
Select an option to see the answer and solution.
Which function is used to verify whether a variable contains a value?
A. header()
B. footer()
C. inset()
D. isset()
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
A. 2 and 3
B. 1 and 4
C. 2, 3 and 4
D. All of the mentioned
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.
A. Hard-coding a login pair directly into the script
B. File-based authentication
C. Data-based authentication
D. PEAR’S HTTP authentication
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.
A. Inside
B. Outside
C. Within
D. None of the mentioned
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?
A. break()
B. divide()
C. explode()
D. md5()
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
A. 1 and 4
B. 1 and 3
C. 2 and 3
D. 2 and 4
Select an option to see the answer and solution.
Which is the most powerful authentication method among the four?
A. Hard-coding a login pair directly into the script
B. File-based authentication
C. Data-based authentication
D. PEAR’S HTTP authentication
Select an option to see the answer and solution.