2. Explain the process of destroying a single session variable and the process of destroying the entire session with suitable examples of each
Example 1: php delete session
session_destroy(); // To delete whole session
// OR
unset($_SESSION['myVar']); // To delete a session var
Example 2: create session in php
<?php
// Start the session
session_start();
// Set session variables
$_SESSION["color"]= "blue";
$_SESSION["animal"]= "dog";
echo "The session variable are set up.";
?>