The following code works with register_globals=On. What do I have to change to make it work with register_globals=Off. Of course I would like the code to be independent of registers_globals On or Off. I have PHP V4.2 on the testing server? Any assistance would be appreciated by this 70 year old man attempting to learn PHP.
Chas...........
<?php
if(!isset($COOKIE_SET))
{
setcookie("whichPage","$page");
header ("Location: $PHP_SELF?COOKIE_SET=1");
exit;
};
?>
<html>
<head>
<title>CookieWorks with RG On</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>Testpage for index.php</p>
<p><a href="cookieworks.php?page=one">Link 1</a></p>
<p><a href="cookieworks.php?page=two">Link 2</a></p>
<p><a href="cookieworks.php?page=three">Link 3</a></p>
<p>page =<?php print "$whichPage"; ?></p>
<p><?php
if(isset($_COOKIE['whichPage']))
{
include "$whichPage.htm";
exit;
};
?></p>
</body>
</html>