> ===== Start of Code ===== > <?php > session_start(); > header("Cache-control: private"); //IE 6 Fix > if(!$_SESSION['count']){ > $_SESSION['count'] = 1; > $sid = session_id(); > echo '<p>Session is: ' . $sid . '</p>'; > } else { > $_SESSION['count']++; > } > echo '<p>You have visited <? echo $_SESSION[\'count\']; ?> pages so > far!</p>'; > echo '<p><a href="test.php?sid="' . $sid . '>Increment Your > Counter!</a></p>'; > ?>
are you sure $sid is getting set? this if(!$_SESSION['count']) might skip it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php