Code has been added to clipboard!

Variable Values in PHP Sessions

Example
<?php session_start(); ?>
<!DOCTYPE html>
<html>
  <body>
  <?php
    // Echo session variables that were set on previous page
    echo "The color of my choice is " . $_SESSION["color"] . ".<br>";
    echo "The animal of my choice is " . $_SESSION["animal"] . ".";
  ?>
  </body>
</html>