session_id()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Czar
Forum Commoner
Posts: 58
Joined: Sun Dec 29, 2002 11:17 am

session_id()

Post by Czar »

I have a problem with session id's. When i finish the session with session_unset() and session_destroy() and start a new session after that, the session id is still same. Why? Session vars are registered like $_SESSION['var1']. This is annoying...
Czar
Forum Commoner
Posts: 58
Joined: Sun Dec 29, 2002 11:17 am

Post by Czar »

Got a solution from another post.

Code: Select all

<?php
$_SESSION = array(); 
unset($_COOKIE[session_name()]); 
session_destroy();
session_start();
?>
Weird, how session_destroy doesn't really destroy the session variables... (?)

Is this a featur in PHP or a flaw?
Post Reply