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 2 of 2
  1. #1
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts

    Customizing welcome screen

    I need to know how to post a username on my page from my database, but only if the user log's in correctly...can anyone help?

  • #2
    Regular Coder Deacon Frost's Avatar
    Join Date
    Feb 2008
    Location
    Between the Lines
    Posts
    279
    Thanks
    31
    Thanked 4 Times in 4 Posts
    Should be pretty simple :S. Just..

    PHP Code:
    <?
    //check if user is logged in
    if($loggedin)
    {
    echo 
    "Welcome".$username."!";
    }
    else
    {
    echo 
    "Welcome Guest!";
    }
    ?>
    Where $loggedin would be if the session is equal to the value needed to view it.


  •  

    Posting Permissions

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