Changeset 49 for trunk/examples/example_basic_count.php
- Timestamp:
- 09/05/06 23:00:01 (2 years ago)
- Files:
-
- trunk/examples/example_basic_count.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/example_basic_count.php
r46 r49 21 21 $sess =& patSession::singleton( 'ham' ); 22 22 23 if( isset( $_REQUEST['restart'] ) && $_REQUEST['restart'] == 'force' ) 24 { 23 if( isset( $_REQUEST['restart'] ) && $_REQUEST['restart'] == 'force' ) { 25 24 $sess->restart(); 26 25 } 27 26 28 27 // see wheter the started session is new 29 if( $sess->isNew() ) 30 { 28 if( $sess->new ) { 31 29 echo '<b>Hurray!</b> A new session was born! :-)<br />'; 32 } 33 else 34 { 30 } else { 35 31 echo '<b>Continue</b> session...<br />'; 36 32 } 37 33 38 34 // recieve the session counter 39 echo 'Session Counter: <b>' . $sess-> getCounter(). '</b><br />';35 echo 'Session Counter: <b>' . $sess->counter . '</b><br />'; 40 36 41 37 // get query string 42 38 echo '<br />'; 43 $queryString = $sess-> getQueryString();39 $queryString = $sess->SID; 44 40 echo '- <a href="' . $_SERVER['PHP_SELF'] . '?' . $queryString . '" title="'. $_SERVER['PHP_SELF'] . '?' . $queryString .'">Continue this session</a> <br />'; 45 41 echo '- <a href="' . $_SERVER['PHP_SELF'] . '" title="'. $_SERVER['PHP_SELF'] . '">Start over</a> (make sure, that you don\'t send cookies!) <br />';
