Description
bool
session_regenerate_id ( void )
session_regenerate_id() will replace the current
session id with a new one, and keep the current session information_
Devuelve TRUE si todo se
llevó a cabo correctamente, FALSE en caso
de fallo_
Ejemplo 1_ A session_regenerate_id() example <?php
session_start();
$old_sessionid = session_id();
session_regenerate_id();
$new_sessionid = session_id();
print "Old Session: $old_sessionid<br>";
print "New Session: $new_sessionid<br>";
print_r($_SESSION);
?> |
|
Nota:
As of PHP 4_3_3, if session cookies are enabled, use of
session_regenerate_id() will also submit a new
session cookie with the new session id_
See also session_id(),
session_start(), and
session_name()_