Steph's SESSION Demo (Page 1)

This adds one to a variable and stores that value in a SESSION.

The following shows value in the SESSION.

Array
(
    [var] => 1
)

session_id() = c3d15b95ca2b26b8131c2f4b4059de91

<?php
session_name
("salzburs");
session_start();

include(
'../header/assignmentHeader.php');

// code
error_reporting(E_ALL);    // set error reporting to all
$var = isset($_SESSION['var']) ? $_SESSION['var'] : 0;

$var++;
$_SESSION['var'] = $var;
?>
<link rel="stylesheet" href="../css/assignmentHeaderStyles.css" />
<h1>Steph's SESSION Demo (Page 1)</h1>

<p>
    This adds one to a variable and stores that value in a SESSION.
</p>

<p>
    The following shows value in the SESSION.
</p>

<?php
echo('<pre>');
print_r($_SESSION);
echo(
'</pre>');

echo(
'<p>session_id() = ' . session_id() . '</p>');
?>
<form action="simpleSession2.php" method="post">
    <input type="submit" value="GOTO Page 2">
</form>

<?php
include('../footer/footer.php');
show_source(__FILE__);

?>



include('../header/assignmentHeader.php');
include('../header/assignmentHeader.php');