This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Sessions

Start a PHP Session

Session variables are set.

// first line of the web page
<?php
// Start the session if one is not already started
session_start();
?>
// set session variables and display whether session variables are set
<?php
// Set session variables
$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.";
?>