dotBz Posted January 5, 2008 Share Posted January 5, 2008 Uhm, just one simple question. In PhpBB2 profile page, when you are logged in, you see in the your username, however if you would like to register, you see an input text box requiring you to enter your username. I think it's something like a switcheroo. Also if you are logged in, you see the fields current password, new password, and confirm password. However if you would register, you would see password, confirm password, and the captcha. Do you guys have an idea how to do that? Just wanna know that trick. Does it have something to do with the <!-- BEGIN username_something2x --> ? Link to comment https://forums.phpfreaks.com/topic/84675-question-about-phpbb2/ Share on other sites More sharing options...
revraz Posted January 5, 2008 Share Posted January 5, 2008 if logged in then show this if not logged in, then show that pretty simple Link to comment https://forums.phpfreaks.com/topic/84675-question-about-phpbb2/#findComment-431498 Share on other sites More sharing options...
dotBz Posted January 6, 2008 Author Share Posted January 6, 2008 What about the switcheroo. Maybe something like this. if (logged_in) display the username else display the input text box field Correct? Link to comment https://forums.phpfreaks.com/topic/84675-question-about-phpbb2/#findComment-431623 Share on other sites More sharing options...
revraz Posted January 6, 2008 Share Posted January 6, 2008 Yep, same thing. That's how I do my nav bars. If logged in, show Logout. If not logged in, show Login and Register options. Link to comment https://forums.phpfreaks.com/topic/84675-question-about-phpbb2/#findComment-431630 Share on other sites More sharing options...
HaLo2FrEeEk Posted January 6, 2008 Share Posted January 6, 2008 or switch(logged_in) { case true: do true code; break case false: do false code; break; } But the if is simpler for this. Link to comment https://forums.phpfreaks.com/topic/84675-question-about-phpbb2/#findComment-431654 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.