Tedd's SESSION Demo (Page 2)
The value in the SESSION is carried forward to this page
demonstrating values can be carried in a SESSION.
Please note, this page does not do anything to change the variable value in the SESSION.
It just shows the current value in the SESSION.
Array
(
)
session_id() = 8664682e3f3ec14d4ddca1e8218c7891
CODE FOLLOWS
<?php
session_name("sperlt");
session_start();
include('includes/header.php');
// code
error_reporting(E_ALL); // set error reporting to all
$var = isset($_SESSION['var']) ? $_SESSION['var'] : 0;
?>
<h1>Tedd's SESSION Demo (Page 2)</h1>
<p>
The value in the SESSION is carried forward to this page
demonstrating values can be carried in a SESSION.
</p>
<p>
Please note, this page does not do anything to change the variable value in the SESSION.
It just shows the current value in the SESSION.
</p>
<?php
echo('<pre>');
print_r($_SESSION);
echo('</pre>');
echo('<p>session_id() = ' . session_id() . '</p>');
?>
<form action="session-page1.php" method="post">
<input type="submit" value="GOTO Page 1">
</form>
<?php
include('includes/footer.php');
?>