I am generating code for a login project and appear to have a session problem.. I copied this test from one of the many posts which I browsed.. Each time I click the link, I get a new session file with the variable cnt in it... Seems as though my sessions are expiring immediately upon leaving a page.. Basic php 4.3.9 install on Win XP ... Only change to default php.ini was to set session.save_filepath to "c:\php\sessions"...
<?PHP
session_start();
$cnt = 0;
if (!isset($SESSION['sess_cnt'])) {
$SESSION['sess_cnt'] = $cnt;
} else {
$cnt = $SESSION['sess_cnt'];
$SESSION['sess_cnt']++;
}
?>
<html>
<head>
</head>
<body>
<a href="<?=$_SERVER['PHP_SELF']?>"><?=$cnt?></a>
</body>
</html>
Any insight would be appreciated..
Mr. T.