session close in php code example
Example 1: end session variable php
// destroy the session
<?php
session_destroy();
?>
Example 2: set php varibianle session
<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<?php
// Set session variables
$_SESSION["color"]= "blue";
$_SESSION["animal"]= "dog";
echo "The session variable are set up.";
?>
</body>
</html>
Example 3: php session destroy
<?php
// Destroy the currently active session.
session_destroy();
?>