Sessions are a simple way to store data for individual users against a unique session ID. This can be used to retain information between page requests.

This code is quite simple, but will let you check that sessions are enabled on your server:

<?php
session_start();
if(array_key_exists("counter", $_SESSION)) {
    echo "\$_SESSION['counter'] has been found and is currently set to {$_SESSION['counter']}. I've incremented it, refresh to see the new value";
} else {
    echo "\$_SESSION['counter'] not set. I've set it now, refresh to see the new value";
}

$_SESSION['counter']++;

Save this as something like sessiontest.php and upload it to a server.

Visiting domain.com/sessiontest.php will trigger the code.

You can see this in action here: https://tech.chrisapp.co.uk/PHP/sessionTest.php