Jump to content


Photo

hide login afer loggd in


  • Please log in to reply
2 replies to this topic

#1 LethaLdaku

LethaLdaku
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 17 March 2006 - 10:55 PM

Hi basicaly im unsure how to doit but on my site [a href=\"http://www.myprofilepic.com\" target=\"_blank\"]http://www.myprofilepic.com[/a]
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

#2 TEENFRONT

TEENFRONT
  • Members
  • PipPipPip
  • Advanced Member
  • 338 posts

Posted 18 March 2006 - 04:37 PM

[!--quoteo(post=356045:date=Mar 17 2006, 05:55 PM:name=lethal daku)--][div class=\'quotetop\']QUOTE(lethal daku @ Mar 17 2006, 05:55 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Hi basicaly im unsure how to doit but on my site [a href=\"http://www.myprofilepic.com\" target=\"_blank\"]http://www.myprofilepic.com[/a]
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
[/quote]


by using an if statement -

set $logged in to the username of user ( im not sure how your setting username so il leave this to you )

if ($loggedin) { //if the user is logged in

echo ""; // display nothing

}

else { // if rhe user is not logged in and $loggedin is not set

echo "<form> form code etc"; // display the form

}


Teenfront.co.uk : Free Teen Chat -  FunkySmileys.co.uk : MSN Smileys -  ArcadeMonkey.co.uk : Free Flash Games
8Baller.co.uk : Free Multiplayer Pool [url=http://8Baller.co.uk]

#3 Yuzi

Yuzi
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 April 2006 - 11:35 AM

[!--quoteo(post=356186:date=Mar 18 2006, 05:37 PM:name=TEENFRONT)--][div class=\'quotetop\']QUOTE(TEENFRONT @ Mar 18 2006, 05:37 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
by using an if statement -

set $logged in to the username of user ( im not sure how your setting username so il leave this to you )

if ($loggedin) { //if the user is logged in

echo ""; // display nothing

}

else { // if rhe user is not logged in and $loggedin is not set

echo "<form> form code etc"; // display the form

}
[/quote]

Hi, i've just tried this out, I can get it to determine if a user is logged in or not, using the fact that a username is logged in on the session... where i'm having trouble is getting it to display the form...

at this point:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]

else { // if rhe user is not logged in and $loggedin is not set

echo "<form> form code etc"; // display the form

}
[/quote]

I can't seem to get it to display the form instead, i always get this error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Program Files\xampp\htdocs\loginTest\normal.php on line 60

any help, i'm very new to PHP, just need to get this little bit working! How do i need to put the form code into the echo statement exactly to get it to display the form!! Any help would be much appreciated. thnx!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users