I am trying to destroy the current Session and session_id, and create a new Session and new session_id, but my code is not working.

The abridged version goes like this...

PHP Code:
    session_start();

    
session_unset();
    
session_destroy();

    
session_start();
    
session_regenerate_id(true); 
When I insert var_dump before and after this code the Session disappears, but I get the same session_id?!

(I am trying to make it so that if someone clicks on my "Register" link in the page header, that my code makes sure that anyone who is currently logged in gets logged out and all Session and Session-Cookie data is destroyed, and then a new Session and session_id are created for the *new* User.)

What is going on?

Sincerely,


Debbie