php $_SESSION tutorial code example
Example 1: php delete session
session_destroy(); // To delete whole session
// OR
unset($_SESSION['myVar']); // To delete a session var
Example 2: session start php
<?php
// This sends a persistent cookie that lasts a day.
session_start([
'cookie_lifetime' => 86400,
]);
?>