<?php
/*
bool session_start ([ array $options = [] ] )
// With session we store information in variables that used across multiple pages
// The variables is not stored on the computer
*/
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<?php
$_SESSION["user_name"] = "ron";
$_SESSION["country"] = "usa";
echo $_SESSION["user_name"] . " - " . $_SESSION["country"];
// Unset all of the session variables
$_SESSION = array();
echo $_SESSION["user_name"] . " - " . $_SESSION["country"];
?>
</body>
</html>
<?php
/*
run:
ron - usa
Notice: Undefined index: user_name in C:\xampp\htdocs\workingframe.com\test.php on line 25
Notice: Undefined index: country in C:\xampp\htdocs\workingframe.com\test.php on line 25
-
*/
?>