Encode all session data into a single string and return the result : session_start « Cookie Session « PHP






Encode all session data into a single string and return the result

 
<?php
   session_start();
   $_SESSION['username'] = "jason";
   $_SESSION['loggedon'] = date("M d Y H:i:s");
   
   $sessionVars = session_encode();
   echo $sessionVars;
?>
  
  








Related examples in the same category

1.
2.Session running
3.Session starter
4.Sessions with register_globals on or off in session_test.php
5.session_start() checks to see if a session has started, and if not, it starts one.