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
Answer: Option C
Solution(By Examveda Team)
$_SERVER[‘PHP_AUTH_USER’] and $_SERVER[‘PHP_AUTH_PW’] store the username and password values, respectively.Related Questions on HTML Forms Handling
Which two predefined variables are used to retrieve information from forms?
A. $GET & $POST
B. $_GET & $_POST
C. $__GET & $__POST
D. GET & POST
A. basic sql injection
B. advanced sql injection
C. cross-site scripting
D. scripting
When you use the $_GET variable to collect data, the data is visible to.
A. none
B. only you
C. everyone
D. selected few
When you use the $_POST variable to collect data, the data is visible to.
A. none
B. only you
C. everyone
D. selected few
Join The Discussion