im making a "login on index page" hack for a small forum system. basicly im copying the code from login.php, to the index page, but i need a code that will not display it if the person is already loged in. does anyone know what to put? please reply
im doing this for my own forum SYSTEM. there xmb, phpbb, well, i have one of my own, and i need to make that hack
At the top of the page you should put a $loggedIn variable which is initially false. After the user successfully logs in you set that var to true. This way you can hide or show your login form in respect to the user login status. I hope it helps. ( I'm not a php guru so you probably should listen to other's opinions )
Mr.A: as he said, it's a home built solution. mybluehair: it's pretty hard to help you really, but essentially you need to just add an if around your display code. That if will be something like: if ( ! $logged_in ) { // display the login form } now, how you determine whether a user is logged in or not we don't know, so that's pretty much all we can tell you...