connect($username,$passwd); if($result == True) { include("./main.php"); // Username/password correct. Loading main Frame. } else { if($ldap->server) { $error_message = "Wrong Password/Username combination. Try again."; include("./login.inc"); // Username/password invalid. Returning to Login page. } else { $error_message = "Cannot connect to specified LDAP-Server. Try again."; include("./login.inc"); // Server not reachable. Returning to Login page. } } } // Loading Login page else { include("./login.inc"); } ?>