logout('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); if ( !$user->is_loaded() ) { //Login stuff: if ( isset($_POST['uname']) && isset($_POST['pwd'])){ if ( !$user->login($_POST['uname'],$_POST['pwd'],$_POST['remember'] )){//Mention that we don't have to use addslashes as the class do the job echo 'Wrong username and/or password'; }else{ //user is now loaded header('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']); } } echo '

Login

username:

password:

Remember me?

'; }else{ //User is loaded echo 'logout'; } ?>