Accessing Session Data

Jun 15, 2009 Author: City Hall

Once the session has been started, you can access its data in the $_SESSION superglobal
array:

// Set a session variable
$_SESSION[’hide_menu’] = true;
// From here on, we can access hide_menu in $_SESSION
if ($_SESSION[’hide_menu’])
 {// Hide menu}


views 2368
  1. Add New Comment