Can someone please explain how session variables works and how I use them?
A good place to start would be to read about how PHP's [man]session[/man] variables work.