hi,
I have made an administration in php with login, etc... I have coded this, but it doesn't work!
Who can I unregister a session?
<?php //logoff.php session_unregister("username"); session_unregister("password"); header("Location: /"); ?>
Just use session_destroy().
<?php //logoff.php session_destroy(); header("Location: /"); ?>
LOL! 😃
doesn't work!
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in ...\logoff.mrm on line 4
Warning: Cannot modify header information - headers already sent by (output started at D...min\logoff.mrm:4) in D:...\mrmadmin\logoff.mrm on line 5 🙁
Originally posted by kumschick Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in ...\logoff.mrm on line 4 🙁
Did you remember to initialise the session with session_start()?