When you want to store information in a session use $_SESSION – this is where you store and retrive session data .
Example
<?php
session_start();
$_SESSION[‘phpcodez_views’] = 1; // store data
echo $_SESSION[‘phpcodez_views’]; //retrieve data
?>