Hi basicaly im unsure how to doit but on my site http://www.
Moderator: General Moderators
-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
Hi basicaly im unsure how to doit but on my site http://www.
Hi basicaly im unsure how to doit but on my site http://www.myprofilepic.com
it has login box on the main page and when u sign in it still shows the login box
i was wondering how i would hide the login box for logged in users
it has login box on the main page and when u sign in it still shows the login box
i was wondering how i would hide the login box for logged in users
All you woud need is an if-else statement... and a function or variable to check if the user is logged in...
Code: Select all
<?php
if (user_logged_in()) {
// do nothing
} else {
// show login box
?>
some html for login box
<?php
}
?>-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm
Pseudocode? 
That isn't actual code...
Code: Select all
<?php
if (user=logged in) {
// do nothing
} else
show login.php
?>-
Lethal Daku
- Forum Newbie
- Posts: 7
- Joined: Fri Mar 17, 2006 4:59 pm