So how do I use all of this?
Since PHP 4.1.0, sessions variables can now be referenced using the PHP superglobal $_SESSION, which makes dealing with session variables extremely easy! Using the superglobal, session variables can be declared and referenced just like other normal PHP variables. Keeping in mind that all superglobal variables are actually arrays, we have this series of examples of how to declare them (pretty standard stuff):
Single variables:
Array variables:
And that's about it! It's not really that difficult to use - the trickest part is knowing where to start sessions, and how to build the replacement session functions (which has been done for you).
If all you wanted to do was use sessions, you should be all set to go. If you'd like to continue on, the next part of this tutorial covers how to use PHP sessions to perform authentication on webpages and processes.