Results 1 to 3 of 3

Thread: logout error

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default logout error

    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:
    PHP Code:
    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
    Last edited by auriaks; 11-21-2009 at 11:47 PM.

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

    Default

    You need to call session_start(); before you try to do anything.

  3. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •