Jump to content

Archived

This topic is now archived and is closed to further replies.

Unholy Prayer

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

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.