Dobra Panowie Wielkie Głowy powiedzta mnie dlaczego ten skrypt wyświetla mi napis "Nie jesteś zalogowany!"?
<?php
if (isset($authorized)) { echo "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<title>Marsjańsjki formularz rekrutacyjny</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="Solaris.css" type="text/css">
</head>
<body>
<table width="750" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top" class="maintable">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="top"><a href="http://marsgw.fora.pl" class="nav"><img src="images/forumlogo.jpg" width="253" height="98" border="0" /></a></td>
<td width="50%" valign="top"></td></tr><tr>
<td colspan="2"><img src="images/bg_top_border.jpg" width="750" height="51" /></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tableborder">
<table width="100%" border="0" cellspacing="1">
<tr>
<td colspan="4" class="categorybar">
<table border="0" width="100%">
<tr>
<td><img src="images/category_icon.gif"></td>
<td><font class="cattitle">Rekrutacja do MARSa - Głosowanie</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1">
<table border="0" width="100%">";
echo "Działa!";}
else echo "Nie jestes zalogowany! <a href="glosuj.php"> Logowanie </a>";
?>
Oczywiście jak na tą chwile sprawa wydaje sie wam oczywista - nie ma pliku, który przesyła do tego pliku informacje o sesji, ale plik jest i wszystko działa, gdy w skrypcie przeprowadze małą - wręcz kosmetyczną zmianę. Oto ona(zwróćcie uwage na położenie polecenia session_start()):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<title>Marsjańsjki formularz rekrutacyjny</title>
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="Solaris.css" type="text/css">
</head>
<body>
<table width="750" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top" class="maintable">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" valign="top"><a href="http://marsgw.fora.pl" class="nav"><img src="images/forumlogo.jpg" width="253" height="98" border="0" /></a></td>
<td width="50%" valign="top"></td></tr><tr>
<td colspan="2"><img src="images/bg_top_border.jpg" width="750" height="51" /></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tableborder">
<table width="100%" border="0" cellspacing="1">
<tr>
<td colspan="4" class="categorybar">
<table border="0" width="100%">
<tr>
<td><img src="images/category_icon.gif"></td>
<td><font class="cattitle">Rekrutacja do MARSa - Głosowanie</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row1">
<table border="0" width="100%">
<?php
if (isset($authorized)) { else echo "Nie jestes zalogowany! <a href="glosuj
.php
"> Logowanie </a>"; ?>
z kolei przy tym drugim skrypcie wywala mi błąd, że session_start musi być na początku strony, ale poza tym wyświetla tabelkę i tekst Działa. Co tu jest nie tak?