Unholy Prayer Posted August 28, 2006 Share Posted August 28, 2006 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? Link to comment https://forums.phpfreaks.com/topic/18863-i-think-this-has-to-do-with-if-statements/ Share on other sites More sharing options...
radar Posted August 28, 2006 Share Posted August 28, 2006 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... Link to comment https://forums.phpfreaks.com/topic/18863-i-think-this-has-to-do-with-if-statements/#findComment-81461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.