Mam taki skrpyt ale niestety gdy przejde na inn± strone dane gin± zostaje tylko to ze jestem zalogowany. Co tu jest ¼le

<?$login = $_POST[\"login\"];
$haslo = $_POST[\"haslo\"];
if ($_GET[\"login\"]==\"koniec\") {
// wylogowanie
} else if ($login<>\"\" and $haslo<>\"\") {
$wynik=mysql_query(\"UPDATE logowanie SET imie = 'tak' where login='$login'\"); if ($baza = mysql_connect($mysql_host, $mysql_login, $mysql_haslo, $mysql_online)) { $wynik=mysql_query(\"SELECT * FROM $mysql_tabela WHERE login='$login' and haslo='$haslo' and status=5\");
$_SESSION[\"zalogowany\"]=\"tak\";
$_SESSION[\"login\"]=$dane[\"login\"];
$_SESSION[\"imie\"]=$dane[\"imie\"];
$_SESSION[\"email\"]=$dane[\"email\"];
}
} else echo \"Nie mo¿na po³±czyæ siê z baz±\"; }
}
?>
<html>
<head>
<title>master-TYP.com</title>
<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">
</head>
<body bgcolor=434343 topmargin=0><center>
<table width=700 cellpadding=0 cellspacing=1 bgcolor=black><tr><td>
<table width=700 cellpadding=0 cellspacing=0 bgcolor=black><tr><td height=26 background=1.gif colspan=2 valign=middle>
<div align=center>
<?if ($_SESSION[\"zalogowany\"]!=\"tak\") {?>
<form action=\"index.php\" method=\"post\">
<B><font color=white>Login: <input type=text size=9 class=login name=login>Has³o: <input type=password size=9 class=login name=haslo></b>
<input type=\"submit\" value=\"zaloguj\" /></td>
</form>
<?
}
else{
$n = mysql_query(\"select * from logowanie where login='$login'\"); {
echo\"$log[0]\";
}
?><a href=\"index.php?login=koniec\">wyloguj siê</a>
<?
}?>
<tr><td height=112 background=2.gif colspan=2>
<tr><td height=18 background=3.gif colspan=2><font color=5B5B5B> <img src=\"\" width=20 height=0><b>Data:</b> 13 Marca 2005
<tr><td height=8 background=4.gif colspan=2>
<tr><td valign=top background=menu_tlo.gif>
<table width=168 align=left cellpadding=0 cellspacing=0 valign=top>
<tr valign=top><td width=168 background=menu_1.gif height=23 valign=middle><b><center><font color=white><i>Menu
<tr valign=top><td width=207 background=grafika/menu_left_4.gif height=39 valign=bottom>
<tr valign=top><td width=207 background=grafika/menu_left_5.gif height=4>
<tr valign=top><td width=207 height=20>
</table>
<td valign=top bgcolor=5F5F5F width=532>
<?if ($_SESSION[\"zalogowany\"]!=\"tak\") {?>
<?}?>