Forums

Login form & Welcome Message (2 posts)

  1. YellowLlama
    Member
    Posted 3 years ago #

    hey guys...

    i'm trying to accomplish displaying a welcome message if a user is logged in, failing which (if not logged in), a login form should appear... i've tried this:


    <?php global $user_login, $user_identity; get_currentuserinfo();
    if ($user_login); ?>
    Welcome back <?php echo $user_identity; ?>. (<a href= "/wp-login.php?action=logout">logout</a>)
    <?php else : ?>
    <!-- login form -->
    <?php endif; ?>

    it works up until the else comment, then the page doesn't load at all...

    somethings missing, altho i'm not sure what...

    would really appreciate some help..
    tx :)

  2. maerk
    Member
    Posted 3 years ago #

    Change

    if ($user_login); ?>

    to

    if ($user_login) : ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags