note 49958 deleted from function.session-start by bjori
| From: | bjori@php.net | Date: | Sun, 16 Apr 2006 00:22:56 +0000 |
| Subject: | note 49958 deleted from function.session-start by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108212@lists.php.net to get a copy of this message | ||
Note Submitter: José Enrique Serrano Expósito
----
Based in another note, I make this exercise...
<?php
if( !isSet( $_GET['FirstLoad'] ) ) {
session_start();
$s = 'location:
'.$_SERVER['REQUEST_URI'].'?FirstLoad=NO&PreviousSessionId='.
session_id();
header( $s ); // Reloading...
} else {
session_start();
echo 'session_start();<br>';
echo '$_SESSION is set from now on with ', count( $_SESSION ), '
items.<br>';
session_regenerate_id(); // Must execute it after session_start()
echo 'session_regenerate_id(); // Must execute it after session_start()<br>';
echo '$_GET[\'PreviousSessionId\'] and session_id()
.-<br>';
echo $_GET['PreviousSessionId'].'<br>'.
session_id().'<br>';
}
?>