Page 1 of 1

destroy session id

Posted: Thu Jun 05, 2003 10:44 pm
by AVATAr
a friend of mine have this problem.:

Code: Select all

<?php
	session_start();
	session_unset();
	session_destroy()
?>
html stuff
he use this code to destroy the session, but when he creates the session again THE SAME SESSION ID is created.. any comments?

Posted: Fri Jun 06, 2003 1:15 am
by delorian
I had problems usign session_unset(), so I tried something like this:

Code: Select all

<?php 
   session_start(); 
   $_SESSION = array();
   unset($_COOKIE&#1111;'session_name_here']);
   session_destroy();
?>
And it works on my site.

Posted: Fri Jun 06, 2003 5:17 am
by AVATAr
thanks, i was reading the online manual.. and i found that soution.. i'll tell my friend of it.. ;)