Dear all,
I have problem use session on windows. Here is two php scrip I test:
1)
<?php
session_start();
?>
<html>
<head>
<title>Listing 16.2 Storing variables in a session</title>
</head>
<body>
<?php
$_SESSION['product1'] = "Sonic Screwdriver";
$_SESSION['product2'] = "HAL 2000";
print "The products have been registered.";
?>
</body>
</html>

2)
<?php
session_start();
?>
<html>
<head>
<title>Listing 16.3 Accessing stored session variables</title>
</head>
<body>
<?php
print "Your chosen products are:\n\n";
print "<ul><li>$_SESSION[product1]\n<li>$_SESSION[product2]\n</ul>\n";   

?>
</body>
</html>

First, I run script one, then script two, but it doesn't print any global value. It 
seems the session was not working. Do I need to configure the php.ini and how? 

thank you!

Henry

Reply via email to