session

From: Date: Thu, 06 Sep 2001 12:53:45 +0000
Subject: session
Groups: php.general 
Request: Send a blank email to php-general+get-66211@lists.php.net to get a copy of this message
hi all, i'm trying to use session variables. people can login using a loginform. if they are already logged in I want the previous session to be destroyed before the new session starts. if it's their first login the session shoulds also start. if I first login with name1/password1 I give url1 back If I then login with name2/password2, url2 should be given back, however when I print all sessionvariables they are still filled with the properties of the first login (also url1). Is there some way to avoid this problem? it seems that the sessionvariables are not really destroyed. Or is it that i'm using both session commands (start and destroy) in the same script. thx to anyone who can shine a light on this... Wilbert code ----------- <?php if (isSet($sessie_loginnaam)) { session_unregister('sessie_loginnaam'); session_unregister('sessie_status'); session_unregister('sessie_url'); session_destroy(); } ----more code--- session_start(); session_register('sessie_loginnaam'); session_register('sessie_status'); session_register('sessie_url'); ?> ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl info@pdd.nl -------------------------

« previous php.general (#66211) next »