I am using PHP 4.0.6.
The value of the $HTTP_SESSION_VARS missing when pass to another page. The output from page2.php is blank.
Can anyone help me find out what wrongs with it. It work fine in PHP later version but not 4.0.6 😕 😕 😕
Here is my code:
page1.php
<?
session_start();
$HTTP_SESSION_VARS['userName'] = "ABC";
?>
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<? echo $HTTP_SESSION_VARS['userName']; ?>
<A HREF="page2.php">Next</A>
</BODY>
</HTML>
page2.php
<?
session_start();
?>
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<? echo $HTTP_SESSION_VARS['userName']; ?>
</BODY>
</HTML>