PHP : Session
Session
session_start();
$_SESSION["favcolor"] = "green";
echo "Favorite color is " . $_SESSION["favcolor"];
// remove all session variables
session_unset();
// destroy the session
session_destroy();
session_start();
$_SESSION["favcolor"] = "green";
echo "Favorite color is " . $_SESSION["favcolor"];
// remove all session variables
session_unset();
// destroy the session
session_destroy();