1. Home
  2. Computer Science MCQs
  3. PHP
  4. What is the purpose of the $_REQUEST variable in PHP?

Added 20 Jan 2024

What is the purpose of the $_REQUEST variable in PHP?

  1. To handle file uploads
  2. To collect form data after submission Correct answer
  3. To store session variables
  4. To access environment variables

Correct answer

B. To collect form data after submission

16 views

MCQSEXAM

Explanation

$_REQUEST is a superglobal that collects data from $_GET, $_POST, and $_COOKIE.

Reference

Asked in: PHP Certification

https://www.php.net/manual/en/reserved.variables.request.php

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs