Multiple choice technology web technology

By which variable we can retrieve the value passed by the GET and POST Method?

  1. $_REQUEST[]
  2. $_GET[]
  3. $_POST[]
  4. $_SESSION[]
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

$_REQUEST[] is the correct variable that can retrieve values from both GET and POST methods. It's a superglobal array that contains data from $_GET, $_POST, and $_COOKIE. While $_GET and $_POST work for their specific methods, $_REQUEST combines them for convenience.

AI explanation

$_REQUEST[] is a superglobal array that aggregates data from $_GET, $_POST, and $_COOKIE, so it can retrieve a value regardless of whether it was sent via GET or POST. $_GET[] and $_POST[] only capture their respective single method, which is why they don't satisfy the 'either method' requirement here.