Sail E0 Webinar

MCQs

Total Questions : 70 | Page 7 of 7 pages
Question 61. PHP sessions are created using the . . . . . function.
  1.    session_starts()
  2.    sessions_start()
  3.    session_start()
  4.    none of above
 Discuss Question
Answer: Option C. -> session_start()
Question 62. When you want to store user data in a session use the . . . . array.
  1.    $_SESSION
  2.    SYS_SESSION
  3.    $SESSION
  4.    $_SESSIONS
 Discuss Question
Answer: Option A. -> $_SESSION
Question 63. Sessions allow you to.
  1.    store persistent user preference on a site
  2.    save user authentication information from page to page
  3.    create multipage forms
  4.    all of above
 Discuss Question
Answer: Option D. -> all of above
Question 64. A snapshot of the session data can be taken at any time and written out to a file.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True
Question 65. When the session data is written to a file, it can be read back, decoded and applied to the current session using the . . . . function.
  1.    session_reset()
  2.    session_get_cookie_params()
  3.    session_encode()
  4.    session_decode()
 Discuss Question
Answer: Option D. -> session_decode()
Question 66. Session_destroy() instantly destroy elements of the $_SESSION array.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
Question 67. Appending session data to an absolute URL does not represent a security risk.
  1.    True
  2.    False
 Discuss Question
Answer: Option B. -> False
Question 68. If the php.ini register_globals directive is set, session data becomes available in the . . . . namespace.
  1.    Global
  2.    Local
  3.    Function
  4.    Class
 Discuss Question
Answer: Option A. -> Global
Question 69. No expiry date is set in the cookie that PHP sets for the session. The session remains current only as long as the browser is active. When the browser is restarted the cookie is not stored. This behavior can be changed by altering . . . . . setting in php.ini file.
  1.    cookie_lifetime
  2.    session.cookie_life_time
  3.    session.cookie_lifetime
  4.    cookie_life_time
 Discuss Question
Answer: Option C. -> session.cookie_lifetime
Question 70. Session_destroy() erases all session variable.
  1.    True
  2.    False
 Discuss Question
Answer: Option A. -> True

Latest Videos

Latest Test Papers