Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Why not?

  1. #1
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Why not?

    Hey there,
    I've created a small piece of code to log you in and set the session variables with your info. Then when you go to another page, it will log you out, well its supposed to, but it doesn't. I've also made a debug page which will just show the $_SESSION variables so I know what's going on.

    Heres the code:
    PHP Code:
    } elseif($a == "logout") {
        unset(
    $_SESSION); // Supposedly logs me out
        
    echo 'Logged out...<br><br>';
        
    print_r($_SESSION); // Returns black
    } elseif($a == "register") {
        
    } elseif(
    $a == "ticket") {
        
    } elseif(
    $a == "check") {
        
    } elseif(
    $a == "debug") {
        echo 
    '<strong><center>Debug Info</center></strong><br><br>';
        
    print_r($_SESSION); // Returns will all my information here
    } else {
        echo 
    '0 0x01';

    Any ideas why it dont log me out?

    thanks

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,472
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts

  • #3
    Regular Coder
    Join Date
    Oct 2004
    Posts
    104
    Thanks
    7
    Thanked 2 Times in 2 Posts
    Thanks mate! Works great


  •  

    Posting Permissions

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