1. Home
  2. Computer Science MCQs
  3. PHP
  4. What does the $_SESSION superglobal in PHP store?

Added 23 Jan 2024

What does the $_SESSION superglobal in PHP store?

  1. Cookies
  2. Session variables Correct answer
  3. Server variables
  4. Global variables

Correct answer

B. Session variables

16 views

MCQSEXAM

Explanation

$_SESSION stores session variables — data kept on the server for one visitor and available across multiple pages, such as login status or a shopping cart.

Only the session ID is sent to the browser, usually in a cookie. Cookies themselves are read through $_COOKIE and server details through $_SERVER.

For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.

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