Jump to content


Photo

I think this has to do with IF statements...


  • Please log in to reply
1 reply to this topic

#1 Unholy Prayer

Unholy Prayer
  • Members
  • PipPipPip
  • Advanced Member
  • 166 posts

Posted 28 August 2006 - 03:52 AM

Ok, I want to show a login form on my index page if the user isn't logged in.  How do I make it so the login form only shows up for users that aren't logged in?

#2 radar

radar
  • Members
  • PipPipPip
  • Advanced Member
  • 645 posts
  • LocationSLC

Posted 28 August 2006 - 05:10 AM

well first off you'd need to decide if you are using cookies or sessions.. and then alter this code to suite..

$username = $_SESSION['inuser'];
if ($username == "") {
$username == "Guest"
include ('login.php');
}

And there you go...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users