First of all, we look a little bit on your code..

It should be something like this:
code
-----------
<?php
if (true == session_is_registered("main_session_variable")
 {
   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');

?>

The big clue is to have a session variable that uniquely identifies the
session. (think like you're dealing with a damn database =) ).
And before I forget... DO NOT use start() and destroy() in the same
script... It will only generate mess and yet more mess..

Good luck,

André






"Wilbert Enserink" <[EMAIL PROTECTED]> wrote in message
01a901c136d2$f72f7880$[EMAIL PROTECTED]">news:01a901c136d2$f72f7880$[EMAIL PROTECTED]...
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

Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
[EMAIL PROTECTED]
-------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to