Hi basicaly im unsure how to doit but on my site http://www.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
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.

Post by Lethal Daku »

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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

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

Post by Lethal Daku »

removed
Last edited by Lethal Daku on Tue Mar 21, 2006 1:39 pm, edited 1 time in total.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

And which part of my post didn't you understand?
Lethal Daku
Forum Newbie
Posts: 7
Joined: Fri Mar 17, 2006 4:59 pm

Post by Lethal Daku »

non as im not a coder,jus lookin for abit of gudiance for that 1 thing
Lethal Daku
Forum Newbie
Posts: 7
Joined: Fri Mar 17, 2006 4:59 pm

Post by Lethal Daku »

removed...
Last edited by Lethal Daku on Tue Mar 21, 2006 1:39 pm, edited 1 time in total.
Lethal Daku
Forum Newbie
Posts: 7
Joined: Fri Mar 17, 2006 4:59 pm

Post by Lethal Daku »

dunt look any diff but guy who did it sent it n said its diff :?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Lethal Daku wrote:dunt look any diff but guy who did it sent it n said its diff :?
What? :?
Lethal Daku
Forum Newbie
Posts: 7
Joined: Fri Mar 17, 2006 4:59 pm

Post by Lethal Daku »

removed
Last edited by Lethal Daku on Tue Mar 21, 2006 1:39 pm, edited 1 time in total.
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

Pseudocode? :?

Code: Select all

<?php
if (user=logged in) { 
// do nothing
} else
show login.php
?>
That isn't actual code...
Lethal Daku
Forum Newbie
Posts: 7
Joined: Fri Mar 17, 2006 4:59 pm

Post by Lethal Daku »

if got no exp in this thats why i fort it wud be better to ask so
Post Reply