session_start merely starts the session, as the name implies, it does not store any information at all. Once you have called session_start on page you can then use the session super global array of $_SESSION. An example....
PHP Code:
<?php
session_start();
$username = 'john';
// Now lets store this username in a session variable so that we can call it up on other pages.
$_SESSION['username'] = $username;
?>
Now on any subsequent page you can simply call session_start again and have access to $_SESSION['username'].
|