Q43
Which one of the following statements should you use to set the session username to Nachi?
A.
$SESSION[‘username’] = “Nachi”;
B.
$_SESSION[‘username’] = “Nachi”;
AnswerC.
session_start(“nachi”);
D.
$SESSION_START[“username”] = “Nachi”;
Answer: Option B
Solution
Answer: Option B
Solution:
You need to refer the session variable ‘username’ in the context of the $_SESSION superglobal.