how does php store session data code example
Example 1: 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.";
?>
Example 2: php session destroy
<?php
// Destroy the currently active session.
session_destroy();
?>
Example 3: $_SESSION php example
<?php
session_start();
echo session_id();
?>