Logout Link

Discussion in 'Integration' started by reta, Jul 15, 2007.

  1. reta

    reta New Member

    Joined:
    Jun 30, 2007
    Messages:
    2
    I have installed the "Login" script on my blog, but when the user logs in, it does not show that they are logged in nor does it show the logout button. Am I doing something wrong?

    Here's the code as it appears on the site:
    <!-- login box start -->
    <div id="login_box">
    <?php
    if ($au=$_SESSION['_amember_user']){ // user is logged-in
    print "Hello $au[name_f] $au[name_l]!<br>";
    print "<a href='/amember/logout.php'>Logout</a>";
    } else { // user is not logged-in
    print "<form method=post action='/amember/login.php'>
    <input type=text name=amember_login value=username size=10>
    <input type=password name=amember_pass value=password size=10>
    <input type=submit value='Login'>
    </form>";
    }
    ?>
    </div>


    <!-- login box end -->
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Is your page where you have that code is in php?
    Do you have session_start(); line at the top of that page?

Share This Page