-
Which one of the following statements should you use to set the session username to Manjesh?
-
- session_start(“Manjesh”);
- $SESSION_START[“username”] = “Manjesh”;
- $SESSION[‘username’] = “Manjesh”;
- $_SESSION[‘username’] = “Manjesh”;
- None of these
Correct Option: D
You need to refer the session variable ‘username’ in the context of the $_SESSION superglobal.