Log in

View Full Version : Resolved logout error



auriaks
11-21-2009, 11:32 PM
when i try to logout it works but i get this error too:
Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/domains/public_html/index.php on line 10

Script:

if($_GET['act'] == 'logout') {
echo '<center><font color="Green">Sėkmingai atsijungėte.</font></center>';
session_unset();
session_destroy(); // remove the entire session
on line 10 is session destroy... If you need more ingo, ask. Thanks

techietim
11-21-2009, 11:33 PM
You need to call session_start(); before you try to do anything.

auriaks
11-21-2009, 11:47 PM
Thanks :D