In which of the following ways will you receive data from a Web page if you do not know how data is sent?

$_REQUEST[]

$_GET[]

$_POST[]

$_SEND[]

Explanation: Answer option A is correct.

You can use the $_REQUEST[] super global variable to receive data from a Web page if you do not know how data is sent. The $_REQUEST[] is an associative array that by default contains the contents of $_GET, $_POST and $_COOKIE information. Supergobal variables are built in arrays in PHP, which are available in any scope. A user can access a superglobal array within a function or method without using the global keyword. There are following superglobal arrays in PHP:

Arrays

Description

$_COOKIE

It contains keys and values set as browser cookies.

$_ENV

It contains keys and values set by the script's shell context.

$_FILES

It contains information about uploaded files.

$_GET

It contains keys and values submitted to the script using the HTTP get method.

$_POST

It contains keys and values submitted to the script using the HTTP post method.

$_REQUEST

It contains a combined array containing values from the $_GET, $_POST, and $_COOKIE superglobal arrays.

$GLOBALS

It contains all global variables associated with the current script.

Answer option B is incorrect. The $_GET[] super global array contains keys and values submitted to the script using the HTTP get method.

Answer option C is incorrect. The $_POST[] super global array contains keys and values submitted to the script using the HTTP post method.