LethaLdaku Posted March 17, 2006 Share Posted March 17, 2006 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 boxi was wondering how i would hide the login box for logged in users Quote Link to comment Share on other sites More sharing options...
TEENFRONT Posted March 18, 2006 Share Posted March 18, 2006 [!--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) [snapback]356045[/snapback][/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 boxi 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 inecho ""; // display nothing} else { // if rhe user is not logged in and $loggedin is not setecho "<form> form code etc"; // display the form} Quote Link to comment Share on other sites More sharing options...
Yuzi Posted April 18, 2006 Share Posted April 18, 2006 [!--quoteo(post=356186:date=Mar 18 2006, 05:37 PM:name=TEENFRONT)--][div class=\'quotetop\']QUOTE(TEENFRONT @ Mar 18 2006, 05:37 PM) [snapback]356186[/snapback][/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 inecho ""; // display nothing} else { // if rhe user is not logged in and $loggedin is not setecho "<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 setecho "<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 60any 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 [b]exactly[/b] to get it to display the form!! Any help would be much appreciated. thnx! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.