To start a new session you have to use the session_start() function.

session_start();

To check if a session variable exists:

if (!isset($_SESSION['variablename'])){
$_SESSION['variablename']=$valueofvariablename; //session not set;
} else {
$valueofvariablename=$_SESSION['variablename']; //session already set;
}

If you want to end the session as a whole you can use the session_destroy() function.

session_destroy();

Well.. I think that’s enough!