What does the $_SESSION superglobal in PHP store?
Correct answer
B. Session variables
16 views
B. Session variables
16 views
$_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.
Not sure why the answer is B? Ask here and get an explanation.