/home/wpollock1/public_html/PHP/Session2.php
<?php require_once "session_prolog.php"; # This must be first!
?>
<head>
<meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Vary" content="Content-language" />
<title> PHP Session Test #2 </title>
<!-- Although better to use external style sheet,
for Q&D developement this is easier
-->
<style type="text/css" id="internalStyle">
<![CDATA[
h1 { text-align: center; }
]]>
</style>
<?php if ( isset($_SESSION['count']) )
{ ++$_SESSION['count'];
} else {
$_SESSION['count'] = 1;
}
?>
</head>
<body>
<div>
<h1> Session Test #2 </h1>
<p>
On each reload of this page the <em>count</em> should increase by
one.
In this version the file prolog is generated by an external PHP
file included at the top of this one.
</p>
<p>
The number of times you have loaded this page during the current
session is
<strong><?php print $_SESSION['count'] ?></strong>.
</p>
<p>
(Delete the session cookie to reset count.)
</p>
</div>
</body>
</html>