Hello!
I've a wierd problem. Current setup is Win2k box with MySQL and PHP4 under IIS.
I have updated the php ini file to save my sessions to the folder c:\winnt\temp.
When I run my session code, It sets a session (it appears in the winnt\temp folder), and sets its initial value. But any further updates to that session fail. It doesnt update the session variable!
In the code below, I get the echo message "Session set", but the $hits variable is always 1.
If anyone can help me on this, I would appreciate it!
Cheers,
Ben
E.G
<?php
session_start();
if (!session_is_registered('hits')) {
echo "Session not set";
session_register('hits');
$hits = 1;
} else {
echo "Session set";
$hits++;
session_register('hits');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
This page has been viewed <?= $hits ?> times.<br>
Session ID = <?= session_id(); ?>
</body>
</html>