1. Go to this page and download the library: Download prog98rammer/php-session library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prog98rammer / php-session example snippets
#
use Prog98rammer\Session\Session;
// start the session.
$session = new Session();
$session = new Session($prefix);
$session = new Session('test_');
$session = new Session;
$session->prefix('test_')->set('name', 'khalid'); // it will set the session as "test_name"
$sesssion->getPrefix(); // will return the session prefix
$sesssion->all();
// store the new session
$session->set($key, $value);
// for Example
$session->set('name', 'John');