Session running : session_start « Cookie Session « PHP






Session running

 
<?php  session_start(); ?>



<html>

 <head>
  <title>Session running</title>
  <style type="text/css">
    body { font-family:<?php echo $_SESSION['font']; ?> }
  </style>
 </head>

 <body>
 <h3>Preferred font family is 
 <?php echo $_SESSION['font']; ?></h3>
 <a href="prefs3.php?<?php echo( SID ); ?>">Next page</a>
 </body>

</html>
  
  








Related examples in the same category

1.
2.Encode all session data into a single string and return the result
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.